Skip to content

rendering whitespace in overlay for lines with variable heights and fonts#298247

Merged
aiday-mar merged 1 commit intomainfrom
structural-wren
Feb 27, 2026
Merged

rendering whitespace in overlay for lines with variable heights and fonts#298247
aiday-mar merged 1 commit intomainfrom
structural-wren

Conversation

@aiday-mar
Copy link
Contributor

fixes #286150

Copilot AI review requested due to automatic review settings February 27, 2026 14:02
@aiday-mar aiday-mar self-assigned this Feb 27, 2026
@aiday-mar aiday-mar enabled auto-merge (squash) February 27, 2026 14:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses VS Code issue #286150 by making whitespace rendering consistent when lines use font-affecting TextMate rules (variable fonts/line heights), ensuring the whitespace overlay is used instead of falling back to in-line whitespace rendering for some lines.

Changes:

  • Stop suppressing WhitespaceOverlay rendering on lines marked hasVariableFonts.
  • Remove the hasVariableFonts-based fallback that forced in-line whitespace rendering in ViewLine when experimental whitespace rendering is enabled.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/vs/editor/browser/viewParts/whitespace/whitespace.ts Allows the whitespace overlay to render on variable-font lines instead of skipping them.
src/vs/editor/browser/viewParts/viewLines/viewLine.ts Ensures in-line whitespace rendering is only used when experimentalWhitespaceRendering === 'off', avoiding mixed rendering paths.

@aiday-mar aiday-mar merged commit 917576c into main Feb 27, 2026
44 checks passed
@aiday-mar aiday-mar deleted the structural-wren branch February 27, 2026 14:31
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.

Rendered whitespace not pretty when having text mate rules

3 participants