Skip to content

making the getViewportViewLineRenderingData return the correct hasFontInfo#289083

Merged
aiday-mar merged 1 commit intomainfrom
smooth-viper
Jan 20, 2026
Merged

making the getViewportViewLineRenderingData return the correct hasFontInfo#289083
aiday-mar merged 1 commit intomainfrom
smooth-viper

Conversation

@aiday-mar
Copy link
Contributor

fixes #286150

Copilot AI review requested due to automatic review settings January 20, 2026 11:18
@aiday-mar aiday-mar self-assigned this Jan 20, 2026
@aiday-mar aiday-mar marked this pull request as ready for review January 20, 2026 11:19
@aiday-mar aiday-mar enabled auto-merge (squash) January 20, 2026 11:19
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 20, 2026
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 fixes issue #286150 by making hasVariableFonts track font-affecting decorations on a per-line basis instead of globally across the viewport. Previously, if any line in the viewport had a decoration that affected fonts, all lines would be treated as having variable fonts, which could lead to incorrect rendering behavior.

Changes:

  • Changed hasVariableFonts from a single boolean to an array of booleans (one per line in the range)
  • Updated the decoration collection logic to track font-affecting decorations per line
  • Updated consumers to access the per-line boolean values from the array

Reviewed changes

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

File Description
src/vs/editor/common/viewModel/viewModelDecorations.ts Changed hasVariableFonts from boolean to boolean[] in interface; updated _getDecorationsInRange to initialize and populate per-line boolean array
src/vs/editor/common/viewModel/viewModelImpl.ts Updated getViewportViewLineRenderingData and getViewLineRenderingData to access per-line hasVariableFonts values from the array

@aiday-mar aiday-mar merged commit 66b43c3 into main Jan 20, 2026
27 of 28 checks passed
@aiday-mar aiday-mar deleted the smooth-viper branch January 20, 2026 12:11
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