Repository navigation
Render whitespace glyphs in unified-diff code minings and overlay - #2998
Open
tobiasmelcher wants to merge 1 commit into
Open
tobiasmelcher wants to merge 1 commit into
tobiasmelcher wants to merge 1 commit into
Conversation
Contributor
tobiasmelcher
force-pushed
the
d031119/whitespace-glyphs-unified-diff
branch
from
October 9, 2026 14:34
488fb3b to
34df500
Compare
Contributor
Author
|
@HannesWell it would be great if you could review and test this change by end of next week. I'll be on vacation then and plan to merge once I'm back. |
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.
Fixes #2942
When "Show Whitespace Characters" is enabled, the unified-diff deletion and addition code minings now render whitespace as visible glyphs at the configured alpha, matching the editor text drawn by
WhitespaceCharacterPainter:·, the ideographic space (U+3000) as°»on the first column of the expanded tab run¤/¶line delimiters at the end of filled linesThe leading/enclosed/trailing (and ideographic) visibility flags are honored as the editor does, including on all-whitespace lines where any of the three flags shows the run.
Because the label is kept tab-expanded for layout, the glyph substitution learns from the raw line which expanded columns originate from a tab. The click-through overlay opened on a mining keeps the original tabs in its document and lets the real
WhitespaceCharacterPainterrender them.The global whitespace settings are read once and cached, invalidated by a preference-store listener, instead of being re-read on every paint of every mining.
Developed with assistance from Claude Code.