Improve RemoveMultiCursor behavior

If the original selection was not done by the user manually but as a
result of the initial SpawnMultiCursor, deselect this original selection
if we execute RemoveMultiCursor and there is no multicursor to remove
(i.e. the original spawned cursor is the only one). This improves user
experience by making RemoveMultiCursor behavior nicely symmetrical to
SpawnMultiCursor.
This commit is contained in:
Dmytro Maluka
2024-06-15 20:35:55 +02:00
parent 2793c37a94
commit aa9c476b1e

View File

@@ -2053,6 +2053,7 @@ func (h *BufPane) RemoveMultiCursor() bool {
h.Buf.UpdateCursors()
} else if h.multiWord {
h.multiWord = false
h.Cursor.Deselect(true)
} else {
return false
}