Skip to content

Render whitespace glyphs in unified-diff code minings and overlay - #2998

Open
tobiasmelcher wants to merge 1 commit into
eclipse-platform:masterfrom
tobiasmelcher:d031119/whitespace-glyphs-unified-diff
Open

tobiasmelcher wants to merge 1 commit into
eclipse-platform:masterfrom
tobiasmelcher:d031119/whitespace-glyphs-unified-diff

Conversation

@tobiasmelcher

Copy link
Copy Markdown
Contributor

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:

  • spaces as ·, the ideographic space (U+3000) as °
  • tabs as a single » on the first column of the expanded tab run
  • ¤/ line delimiters at the end of filled lines

The 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 WhitespaceCharacterPainter render 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.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

    51 files  ± 0      51 suites  ±0   58m 40s ⏱️ + 1m 19s
 4 493 tests +17   4 471 ✅ +17   22 💤 ±0  0 ❌ ±0 
11 568 runs  +51  11 414 ✅ +51  154 💤 ±0  0 ❌ ±0 

Results for commit 34df500. ± Comparison against base commit 8b229d0.

♻️ This comment has been updated with latest results.

@tobiasmelcher
tobiasmelcher force-pushed the d031119/whitespace-glyphs-unified-diff branch from 488fb3b to 34df500 Compare October 9, 2026 14:34
@tobiasmelcher

Copy link
Copy Markdown
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.

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.

Unified Diff: Whitespace rendering missing in deletion areas

1 participant