Making the whitespaces align vertically with variable font text#298252
Draft
Making the whitespaces align vertically with variable font text#298252
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts editor whitespace rendering so that whitespace markers are rendered via the experimental whitespace overlay even on lines that contain variable-font-affecting decorations, improving alignment with the actual rendered text.
Changes:
- Enable
WhitespaceOverlayrendering for lines flagged withlineData.hasVariableFonts(remove the early-return skip). - Ensure view-line DOM rendering does not render whitespace when
experimentalWhitespaceRendering !== 'off', regardless ofhasVariableFonts, so the overlay is the single whitespace-rendering mechanism in experimental modes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/vs/editor/browser/viewParts/whitespace/whitespace.ts |
Removes the variable-font short-circuit so the overlay can render whitespace markers on those lines. |
src/vs/editor/browser/viewParts/viewLines/viewLine.ts |
Simplifies the whitespace rendering decision so experimental modes always delegate whitespace rendering to the overlay. |
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.
No description provided.