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

[Bug Bash] Quick Fix button being rendered to wrong spot #17631

Closed
carlos-zamora opened this issue Jul 30, 2024 · 2 comments · Fixed by #17614
Closed

[Bug Bash] Quick Fix button being rendered to wrong spot #17631

carlos-zamora opened this issue Jul 30, 2024 · 2 comments · Fixed by #17614
Assignees
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.

Comments

@carlos-zamora
Copy link
Member

Windows Terminal version

1.22.2081.0 (bug bash on 7/30)

Windows build number

No response

Other Software

No response

Steps to reproduce

{11B3EFDF-2243-429B-BA6F-0B028E93B984}

It's being placed in random positions. However, it'll snap to the cursor if you resize when in that state.

May be similar to this bug:
Opening snippets pane causes prompt to disappear and QF button moved to where the prompt is supposed to be?

{9AC1A666-F826-4E04-BCA2-0B923D80B915}

Confirmed it's not related to snippets, so there's something weird going on with drawing the QF button.

Expected Behavior

No response

Actual Behavior

x

@carlos-zamora carlos-zamora added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jul 30, 2024
@carlos-zamora carlos-zamora self-assigned this Jul 30, 2024
@carlos-zamora carlos-zamora added this to the Terminal v1.22 milestone Jul 30, 2024
@carlos-zamora carlos-zamora added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jul 31, 2024
@carlos-zamora
Copy link
Member Author

Oh no, I did a git bisect (a few, actually) and it led me to:
450eec4 A minor ConPTY refactoring: Goodbye VtEngine Edition (#17510)

@lhecker
Copy link
Member

lhecker commented Aug 8, 2024

Flushing in the old VtEngine happened with a 16ms delay (unless the content scrolled) so it's not unlikely that we had a bug already but simply didn't notice due to the delayed output from cmd.

Looking at this image:
{11B3EFDF-2243-429B-BA6F-0B028E93B984}

Doesn't cmd emit the command-not-found VT sequence when printing that exact message? In that case I think it's just natural that the quick-fix button is possibly on the same line. Without knowing the quick-fix code exactly, I suspect we're using a resume_foreground somewhere, lock the text buffer, ask for the cursor position and then show the bulb next to the cursor, right? That can't work reliably since it's timing sensitive and races with the concurrently running cmd output.

If we're fine with showing the bulb next to the cmd error message, the easiest fix for this may be to transmit the row number with the event that informs the control to show the bulb. Unfortunately, we don't yet have unique row IDs that would make it possible to figure out the vertical offset while the text buffer is possibly concurrently scrolling. In that case I think we should add them.

@microsoft-github-policy-service microsoft-github-policy-service bot added the In-PR This issue has a related PR label Aug 13, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants