Skip to content

adding the line height into the model decorations returned by font token decorations provider#289099

Merged
aiday-mar merged 1 commit intomainfrom
mammoth-carp
Jan 20, 2026
Merged

adding the line height into the model decorations returned by font token decorations provider#289099
aiday-mar merged 1 commit intomainfrom
mammoth-carp

Conversation

@aiday-mar
Copy link
Contributor

fixes #288847

Copilot AI review requested due to automatic review settings January 20, 2026 12:51
@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 12:51
@aiday-mar aiday-mar enabled auto-merge (squash) January 20, 2026 12:51
@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 an issue where font token decorations' line height values weren't being properly set. The PR updates the lineHeight property to use a multiplier of the default line height instead of an absolute pixel value, aligning with how line height multipliers are already used elsewhere in the codebase.

Changes:

  • Updated documentation in model.ts and monaco.d.ts to clarify that lineHeight is a multiplier to the default line height
  • Modified viewModelImpl.ts to multiply the decoration's line height by the default line height when computing custom line heights
  • Added lineHeight property to font token decorations in tokenizationFontDecorationsProvider.ts

Reviewed changes

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

File Description
src/vs/monaco.d.ts Updated comment to clarify lineHeight is a multiplier rather than absolute pixel value
src/vs/editor/common/model.ts Updated comment to match monaco.d.ts documentation
src/vs/editor/common/viewModel/viewModelImpl.ts Added logic to multiply lineHeight by defaultLineHeight when computing custom line heights
src/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.ts Added lineHeight property from fontToken to decoration options

@aiday-mar aiday-mar merged commit e28cce4 into main Jan 20, 2026
27 of 28 checks passed
@aiday-mar aiday-mar deleted the mammoth-carp branch January 20, 2026 13:09
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.

Flicker caused by variable line heights when opening a file

3 participants