Fix Deselect() after mouse selection (#3268)
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 #3055
This commit is contained in:
parent
147943837d
commit
3f810c24d2
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ func (h *BufPane) MouseDrag(e *tcell.EventMouse) bool {
|
|||
} else if h.doubleClick {
|
||||
h.Cursor.AddWordToSelection()
|
||||
} else {
|
||||
h.Cursor.SetSelectionEnd(h.Cursor.Loc)
|
||||
h.Cursor.SelectTo(h.Cursor.Loc)
|
||||
}
|
||||
|
||||
h.Cursor.StoreVisualX()
|
||||
|
|
Loading…
Reference in a new issue