-
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
wpf: port selection changes from TermControl, add multi-click selection #5374
Conversation
There's a lot of logic that could be shared between TC and WPF. That is not a discussion to be having before 1.0 😄 |
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.
I'm fine with this too
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.
Approving, contingent on @ZoeyR's approval.
const auto delta{ timestamp - _lastMouseClickTimestamp }; | ||
if (point != _lastMouseClickPos || delta > _multiClickTime) | ||
{ | ||
// exit early. This is a single click. |
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.
// exit early. This is a single click. | |
// This is a single click. |
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.
comment copied from TermControl; i may keep it.
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.
Approved, assuming std::chrono works on win7 (I assume it does)
@ZoeyR so I was thinking about this. It looks like it uses |
(which does exist on w7, so.. fingers crossed) |
Hello @DHowett-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 pull request ports #5096 to WpfTerminalControl, bringing it in line with the selection mechanics in Terminal. It also introduces double- and triple-click selection and makes sure we clear the selection when we resize.
Please read #5096 for more details.
Detailed Description of the Pull Request / Additional comments
This code is, largely, copy-and-pasted from TermControl with some updates to use
std::chrono
andtil::point
. I lovetil::point
. A lot.Validation Steps Performed
Lots of manual selection.