-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Allow interaction with hyperlinks in mouse mode #9396
Conversation
wait is this going to immediately conflict with #9403? |
Code-wise yes :) Logically not :) |
@zadjii-msft - but before reviewing it further - probably it worth considering the discussion in the ticket (#9117). Probably we want to switch the links to ctrl+shift+click to be consistent between mouse mode and non-mouse mode without doing the hacks I did (of both passing the click and handling the link). |
Hmm. I'm not sure how I feel about that. I like the idea of consistency, but I dislike the idea of adding shift to the default modifiers you need to press. If I'm looking to other terminal emulators for precedent, it seems like hyperlinks in |
Okay yea team consensus was that the |
@zadjii-msft, @carlos-zamora -please re-review 😊 |
else if (_CanSendVTMouseInput()) | ||
{ | ||
// GH#9396: hyper-link gets higher priority than mouse mode | ||
_TrySendMouseEvent(point); |
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 a bit worried about the flow of code through these conditionals. This will change the block selection state, track click counts, etc. before dispatching a mouse event.
We might be overdue for refactoring the click dispatcher. . . but this seems a bit too entangled for my taste?
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.
@DHowett you are right as usual, currently the hyperlink handling was already entangled into the selection processing code. This forced me to push the VT processing there as well (as hyperlink should precede).
I issued another commit, trying to decouple everything into:
- try to handle hyperlink
- else try to handle VT mouse
- else try to update selection (left-click)
- else try to handle paste (right-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.
This is such a nit, so I'll approve anyways. But I won't put automerge on it until I get a response. Thanks!
Hello @carlos-zamora! 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 (
|
## PR Checklist * [x] Closes #9117 * [x] CLA signed. * [x] Tests added/passed * [ ] Documentation updated. * [ ] Schema updated. * [x] I've discussed this with core contributors already. ## Detailed Description of the Pull Request / Additional comments In mouse mode: * Underline hyperlinks * Activate hyperlink on ctrl+click rather than sending input to VT (cherry picked from commit 6cd4e03)
## PR Checklist * [x] Closes #9117 * [x] CLA signed. * [x] Tests added/passed * [ ] Documentation updated. * [ ] Schema updated. * [x] I've discussed this with core contributors already. ## Detailed Description of the Pull Request / Additional comments In mouse mode: * Underline hyperlinks * Activate hyperlink on ctrl+click rather than sending input to VT (cherry picked from commit 6cd4e03)
🎉 Handy links: |
🎉 Handy links: |
PR Checklist
Detailed Description of the Pull Request / Additional comments
In mouse mode: