Skip to content

[diffs/edit]: keep virtual EOF caret anchored after line reinsertion#1014

Merged
ije merged 1 commit into
beta-1.3from
ije/fix-eof-caret
Jul 21, 2026
Merged

[diffs/edit]: keep virtual EOF caret anchored after line reinsertion#1014
ije merged 1 commit into
beta-1.3from
ije/fix-eof-caret

Conversation

@ije

@ije ije commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Reproduction steps:
0, Open the demo page, enable editing, and jump to the last line.
1, Press Enter to insert a new line.
2, Press Delete to remove the newly added final line.
3, [Bug] Press Enter again. The page scrolls to the top, and the caret does not remain focused on the newly inserted line.

this PR fix that issue by:

  • Reset cached line geometry after every line-count change.
  • Prevent a removed EOF row from being reused to position the caret at the top.
  • Add regression coverage for Enter → Delete → Enter in a 1,000-line virtualized file.

@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pierre-docs-diffs Ready Ready Preview Jul 21, 2026 12:49pm
pierre-docs-diffshub Ready Ready Preview Jul 21, 2026 12:49pm
pierre-docs-trees Ready Ready Preview Jul 21, 2026 12:49pm
pierrejs-diff-demo Ready Ready Preview Jul 21, 2026 12:49pm

Request Review

@ije

ije commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 072eb4ab5a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ije
ije requested review from amadeus and necolas July 21, 2026 14:05
@ije
ije merged commit bdbd0c7 into beta-1.3 Jul 21, 2026
8 checks passed
@ije
ije deleted the ije/fix-eof-caret branch July 21, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants