Repository navigation
Render whitespace glyphs in unified-diff code minings and overlay - #2998
tobiasmelcher wants to merge 1 commit into
Conversation
Test Results 54 files ± 0 54 suites ±0 37m 49s ⏱️ + 3m 25s Results for commit 975422e. ± Comparison against base commit 0717ca6. This pull request removes 1 and adds 22 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
488fb3b to
34df500
Compare
|
@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. |
64ed3ea to
691da63
Compare
|
Hi @HannesWell, just a friendly reminder: unless I hear any objections, I plan to merge this tomorrow. Thanks! |
1c9c990 to
fa044e6
Compare
|
Hi @HannesWell, Here is the corrected result:
Whitespace differences and trailing line delimiters are rendered in the unified diff For the broader question about simplifying this and potentially making whitespace rendering a general code-mining/ghost-text capability: I agree that deserves a separate discussion. I propose tracking it in a separate issue in eclipse.platform.ui, where we can evaluate a reusable solution rather than expanding this PR further. |
Honor editor whitespace settings in code minings and their click-through overlays, retaining trailing blank lines and CR/LF markers. Preserve detailed-diff backgrounds for changed whitespace and delimiters, including trailing CRLF lines, while limiting delimiter repainting to damaged lines.
fa044e6 to
975422e
Compare



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.