A pair of fixes related to cursor movement in conpty#4372
Merged
3 commits merged intomasterfrom Jan 30, 2020
Merged
Conversation
Member
Author
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
Ref #2697 |
This was referenced Jan 29, 2020
Member
bunck --> bunch |
|
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 (
|
DHowett-MSFT
approved these changes
Jan 30, 2020
|
🎉 Handy links: |
This was referenced Feb 13, 2020
This pull request was closed.
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.
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:
VisibilityThis controls whether the cursor is visible at all, regardless if it's been blinked on or offBlinkingcontrols 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
TriggerCursorMovedwhen 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.SetConsoleScreenBufferto change the active buffer.win-cursesactually uses that API instead of the alt buffer.