Skip to content

fix(ui): keep hunk framing when ] or [ crosses into another file - #406

Merged
umputun merged 1 commit into
masterfrom
fix-cross-file-hunk-framing
Oct 22, 2026
Merged

umputun merged 1 commit into
masterfrom
fix-cross-file-hunk-framing

Conversation

@umputun

@umputun umputun commented Oct 22, 2026

Copy link
Copy Markdown
Owner

with cross-file-hunks on, ] and [ recentered the view on the first changed line after loading another file, which could hide more of the hunk than the same jump within a file. The hunk centering now renders before setting the scroll offset, so the offset clamps against the new content and the hunk's framing is kept. Files without hunks still open with the cursor centered on the first visible line.

Related to #405

with cross-file-hunks on, ] and [ recentered the view on the first changed
line after loading another file, which could hide more of the hunk than the
same jump within a file. The hunk centering now renders before setting the
scroll offset, so the offset clamps against the new content and the hunk's
framing is kept. Files without hunks still open with the cursor centered on
the first visible line.

Related to #405
Copilot AI balanced review requested due to automatic review settings October 22, 2026 15:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@umputun
umputun merged commit 4cb4bc1 into master Oct 22, 2026
7 checks passed
@umputun
umputun deleted the fix-cross-file-hunk-framing branch October 22, 2026 15:31
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