Clip flex editor blocks to the text viewport (#56549) (cherry-pick to preview) - #56574
Merged
Conversation
Resolves #56518 This diff fixes code lens decorations continuing to paint into the gutter when the editor is horizontally scrolled. Code lens entries were rendered as flex editor blocks with explicit gutter padding, which allowed them to bypass the text viewport clipping used by content-only blocks. With this change, code lens entries render as spacer-style custom blocks instead. Spacer blocks already scroll with buffer content and paint through the text-side mask, so the code lens padding can be relative to the editor text area and decorations clip at the left edge of the viewport. | Before | After | | --- | --- | | <video src="https://github.com/user-attachments/assets/dc567ce5-ad04-4ba2-9156-ec4ec087bd41" controls width="320"></video> | <video src="https://github.com/user-attachments/assets/abb5ba2c-981f-4399-903b-0f8fa9a560e4" controls width="320"></video> | Release Notes: - Fixed code lens decorations painting outside the editor viewport when horizontally scrolling.
Collaborator
|
@zed-zippy approve |
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.
Cherry-pick of #56549 to preview
Resolves #56518
This diff fixes code lens decorations continuing to paint into the
gutter when the editor is horizontally
scrolled. Code lens entries were rendered as flex editor blocks with
explicit gutter padding, which allowed
them to bypass the text viewport clipping used by content-only blocks.
With this change, code lens entries render as spacer-style custom blocks
instead. Spacer blocks already
scroll with buffer content and paint through the text-side mask, so the
code lens padding can be relative to
the editor text area and decorations clip at the left edge of the
viewport.
Release Notes:
horizontally scrolling.