Skip to content

Comments

Fix inconsistent cursor movement behavior after mouse selection#3268

Merged
dmaluka merged 1 commit intomicro-editor:masterfrom
dmaluka:mouse-deselect-fix
Apr 25, 2024
Merged

Fix inconsistent cursor movement behavior after mouse selection#3268
dmaluka merged 1 commit intomicro-editor:masterfrom
dmaluka:mouse-deselect-fix

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 micro-editor#3055
@dmaluka dmaluka merged commit 3f810c2 into micro-editor:master Apr 25, 2024
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