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

A pair of fixes related to cursor movement in conpty #4372

Merged
3 commits merged into from
Jan 30, 2020

Conversation

zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented Jan 27, 2020

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 off
  • Blinking 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 is On, 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:

(cherry picked from commit 2e48ed3)
(cherry picked from commit 5d54842)
Copy link
Contributor

@DHowett-MSFT DHowett-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zadjii-msft
Copy link
Member Author

zadjii-msft commented Jan 28, 2020

/azp run

Something weird is going on - both this PR had a build and #4382 as well that failed in x86 for UiaTextRangeTests, though there's no reason they should have affected them...

related: #4344

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@microsoft microsoft deleted a comment from azure-pipelines bot Jan 28, 2020
@DHowett-MSFT
Copy link
Contributor

Ref #2697

@miniksa
Copy link
Member

miniksa commented Jan 29, 2020

Recall that there's a bunck of cursor state that's hard to parse without looking up:

bunck --> bunch

Copy link
Member

@miniksa miniksa left a 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.

@zadjii-msft zadjii-msft added AutoMerge Marked for automatic merge by the bot when requirements are met Needs-Second It's a PR that needs another sign-off labels Jan 29, 2020
@ghost
Copy link

ghost commented Jan 29, 2020

Hello @zadjii-msft!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

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 (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost requested review from carlos-zamora and leonMSFT January 29, 2020 21:06
@ghost ghost merged commit 7e2f51f into master Jan 30, 2020
@ghost ghost deleted the dev/migrie/b/4102-and-2642 branch January 30, 2020 20:14
@ghost
Copy link

ghost commented Feb 13, 2020

🎉Windows Terminal Preview v0.9.433.0 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoMerge Marked for automatic merge by the bot when requirements are met Needs-Second It's a PR that needs another sign-off
Projects
None yet
3 participants