Round custom line heights - #298421
Merged
Alexandru Dima (alexdima) merged 3 commits intoAug 28, 2026
Merged
Conversation
In most calculations within VSCode when dealing with line heights, integer values are used. However, custom line heights via decorations introduce floats. These floats end up in the CSS used to render lines. As a result, this causes a wobble effect when scrolling. This change fixes it, by rounding custom line height values.
Aiday Marlen Kyzy (aiday-mar)
self-requested a review
March 5, 2026 09:26
Alexandru Dima (alexdima)
requested review from
Alexandru Dima (alexdima)
and removed request for
Aiday Marlen Kyzy (aiday-mar)
August 26, 2026 15:23
Alexandru Dima (alexdima)
approved these changes
Aug 26, 2026
Alexandru Dima (alexdima)
enabled auto-merge (squash)
August 26, 2026 15:23
Contributor
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Rounds custom decoration-provided line heights to integers to avoid fractional CSS values that can cause visual “wobble” while scrolling.
Changes:
- Round
specialHeightwhen constructingCustomLine - Round
maximumSpecialHeightto keep related height values integer-aligned
Show a summary per file
| File | Description |
|---|---|
| src/vs/editor/common/viewLayout/lineHeights.ts | Ensures custom line heights are stored as integers by rounding incoming decoration heights |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
roblourens
approved these changes
Aug 26, 2026
TylerLeonhardt
approved these changes
Aug 26, 2026
Alexandru Dima (alexdima)
merged commit Aug 28, 2026
7d0a3d7
into
microsoft:main
44 of 45 checks passed
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.
In most calculations within VSCode when dealing with line heights, integer values are used. However, custom line heights via decorations introduce floats. These floats end up in the CSS used to render lines. As a result, this causes a wobble effect when scrolling.
This change fixes it, by rounding custom line height values.
Fixes #296539