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

fix mouse button streak requiring pixel precision #6476

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jbiosca78
Copy link

The fix made for #1805 introduced a problem where the multiple clicks must be done in the same pixel because the add of pixel offset in ClickPosition.

Multiple clicks in same character but with a little pixel displacement should be taken as multiple clicks as was before #1805.

This pull updates term/src/input.rs function LastMouseClick.add to check streak only if position.column and position.row matches, instead of checking full position with pixel offsets, fixing #6475.

@jbiosca78
Copy link
Author

This fix reduces so much my double click fails, but I still get some fails when I go fast and I double click in a word but the mouse moves from one character to another.

Other terminals like alacritty, terminology or xterm don't require that double click be in the same character. I prefer that behaviour makes me more fast with mouse. Maybe we should make the position check optional. The only pitfall is that if we miss the word to double click and click outside for 'unselect', it would do a triple click if clicking fast, but for me is still desirable because is much less common.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant