Repository navigation
Fix double-width characters in the last column drawing over the view's frame - #6106
Merged
Merged
Conversation
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
force-pushed
the
fix-double-width-chars-at-view-edges
branch
from
October 10, 2026 11:35
7820c82 to
e314ad8
Compare
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.