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

[wrapped lines] inline chat zone shows on the wrong line #196491

Open
gregvanl opened this issue Oct 24, 2023 · 3 comments
Open

[wrapped lines] inline chat zone shows on the wrong line #196491

gregvanl opened this issue Oct 24, 2023 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-api Issues about the API of vscode in the area of editors inline-chat
Milestone

Comments

@gregvanl
Copy link

gregvanl commented Oct 24, 2023

Testing #196258

  1. Open a Markdown file and go to an empty line below a paragraph.
    The example below used https://github.com/microsoft/vscode-docs/blob/main/docs/getstarted/userinterface.md in a local clone of the vscode-docs repo.

image

  1. Click on the gutter sparkle icon.

The inline change opens one line above the empty line.

image

This is not limited to the clicking the sparkle icon. This also happens if you use Ctrrl+I to open the inline chat

@aiday-mar
Copy link
Contributor

aiday-mar commented Oct 25, 2023

Hi @gregvanl, I looked into this, it looks like this is caused because wordwrap is enabled and the zone widget is placed between the two parts of the wrapped line. When word wrap is disabled, the zone widget is placed as expected.

Screen.Recording.2023-10-25.at.11.38.16.mov

I was wondering if this is expected behavior @jrieken ?

@aiday-mar aiday-mar added bug Issue identified by VS Code Team member as probable bug inline-chat labels Dec 4, 2023
@jrieken
Copy link
Member

jrieken commented Dec 4, 2023

I was wondering if this is expected behavior @jrieken ?

This is likely a broader issue with editor view zones which is the editor API that enables this

@aiday-mar aiday-mar added this to the Backlog milestone Dec 5, 2023
@jrieken jrieken added the editor-api Issues about the API of vscode in the area of editors label Dec 15, 2023
@jrieken jrieken assigned alexdima and unassigned aiday-mar Dec 15, 2023
@jrieken
Copy link
Member

jrieken commented Dec 15, 2023

Assuming line 7 wraps and chat is invoked on line 8, then we create a view zone with afterLineNumber: 7 which doesn't seem to take view lines into account

@jrieken jrieken changed the title inline chat displays on the wrong line [wrapped lines] inline chat zone shows on the wrong line Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug editor-api Issues about the API of vscode in the area of editors inline-chat
Projects
None yet
Development

No branches or pull requests

4 participants