-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
A pair of fixes related to cursor movement in conpty #4372
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Azure Pipelines successfully started running 1 pipeline(s). |
Ref #2697 |
bunck --> bunch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good enough to me.
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
Summary of the Pull Request
This is a pair of related fixes to conpty. For both of these bugs, the root cause was that the cursor was getting set to Off in conpty. Without the
CursorBlinkerTimer
, the cursor would remain off, and frames that only had cursor movements would not update the cursor position in the terminal.References
PR Checklist
Detailed Description of the Pull Request / Additional comments
Recall that there's a bunch of cursor state that's hard to parse without looking up:
Visibility
This controls whether the cursor is visible at all, regardless if it's been blinked on or offBlinking
controls whether the blinker timer should do something, or leave the cursor alone.IsOn
: When the cursor is blinking, this alternates between true and false.The trick here is that we only
TriggerCursorMoved
when the cursor isOn
, and there are some scenarios where the cursor is manually set to off.Fundamentally, these two bugs are similar cases, but they are triggered by different things:
DoSrvPrivateAllowCursorBlinking(false)
(^[[?12l
) also manually turning the cursor off.SetConsoleScreenBuffer
to change the active buffer.win-curses
actually uses that API instead of the alt buffer.