Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glyph Widgets Operate On View Positions, Not Model Positions #198674

Closed
hediet opened this issue Nov 20, 2023 · 1 comment · Fixed by #198733
Closed

Glyph Widgets Operate On View Positions, Not Model Positions #198674

hediet opened this issue Nov 20, 2023 · 1 comment · Fixed by #198733
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@hediet
Copy link
Member

hediet commented Nov 20, 2023

Monaco Editor Repro

As you can see, the positioning does not folding into account:

Image

This breaks the revert arrows in the diff editor, as I adopted glyph widgets for them.

@hediet hediet added the bug Issue identified by VS Code Team member as probable bug label Nov 20, 2023
@joyceerhl joyceerhl added this to the November 2023 milestone Nov 20, 2023
@joyceerhl
Copy link
Contributor

We're deciding whether to render widgets based on ctx.visibleRange.startLineNumber and endLineNumber here

for (const widget of Object.values(this._widgets)) {
const range = widget.preference.range;
if (range.endLineNumber < visibleStartLineNumber || range.startLineNumber > visibleEndLineNumber) {
// The widget is not in the viewport
continue;
}
but these are the viewport and not the model line numbers

@vscodenpa vscodenpa added the unreleased Patch has not yet been released in VS Code Insiders label Nov 21, 2023
@hediet hediet added the verified Verification succeeded label Nov 21, 2023
@vscodenpa vscodenpa added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Nov 22, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants