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 inconsistent cursor movement behavior after mouse selection #3268

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

dmaluka
Copy link
Collaborator

@dmaluka dmaluka commented Apr 25, 2024

Ensure that the selection start is always before the selection end, regardless of the direction of a mouse selection, to make h.Cursor.Deselect() handle its start argument correctly.

This makes the cursor behavior after mouse selections consistent with the cursor behavior after keyboard selections.

Together with @dustdfg 's fix #3091, this makes both keyboard and mouse selections work as expected. See also the discussion in #3091.

Fixes #3055

Ensure that the selection start is always before the selection end,
regardless of the direction of a mouse selection, to make
h.Cursor.Deselect() handle its `start` argument correctly.

This makes the cursor behavior after mouse selections consistent with
the cursor behavior after keyboard selections.

Fixes zyedidia#3055
@dmaluka dmaluka merged commit 3f810c2 into zyedidia:master Apr 25, 2024
3 checks passed
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.

Inconsistent cursor up/down moving after selecting with keyboard/mouse
3 participants