Skip to content

Fix double-width characters in the last column drawing over the view's frame - #6106

Merged
stefanhaller merged 2 commits into
masterfrom
fix-double-width-chars-at-view-edges
Oct 10, 2026
Merged

stefanhaller merged 2 commits into
masterfrom
fix-double-width-chars-at-view-edges

Conversation

@stefanhaller

Copy link
Copy Markdown
Collaborator

A double-width character that starts in the last column of a view is drawn over the view's frame. One that is scrolled halfway out to the left is skipped, and the column it reaches into isn't drawn at all. The draw loop clips cells against the edges of the view as if every cell were one column wide.

A terminal can't show half of a double-width character. So draw a blank in the column that is on screen, in the character's colors, and let the selection highlight cover that column like any other.

@stefanhaller stefanhaller added the bug Something isn't working label Oct 9, 2026
@stefanhaller
stefanhaller added this pull request to stack #6108 October 9, 2026 18:58
stefanhaller and others added 2 commits October 10, 2026 13:35
If a double-width character starts in the last column of a view that
doesn't wrap, its second half is drawn over the view's frame. If one is
scrolled halfway out to the left, the column it still reaches into isn't
drawn at all. This column then has neither the selection highlight nor
the line's background. Both happen in every view that doesn't wrap: the
side panels, and the main view with gui.wrapLinesInDiffView set to
false.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A double-width character that starts in the last column of a view is
drawn over the view's frame. One that is scrolled halfway out to the
left is skipped, and the column it reaches into isn't drawn at all. The
draw loop clips cells against the edges of the view as if every cell
were one column wide.

A terminal can't show half of a double-width character. So draw a blank
in the column that is on screen, in the character's colors, and let the
selection highlight cover that column like any other.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@stefanhaller
stefanhaller force-pushed the fix-double-width-chars-at-view-edges branch from 7820c82 to e314ad8 Compare October 10, 2026 11:35
@stefanhaller
stefanhaller merged commit 8771f1f into master Oct 10, 2026
12 checks passed
@stefanhaller
stefanhaller deleted the fix-double-width-chars-at-view-edges branch October 10, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

⌂ 换网址