From aa9c476b1efe1d7da3bc6eb97b53c6662a6c945e Mon Sep 17 00:00:00 2001 From: Dmytro Maluka Date: Sat, 15 Jun 2024 20:35:55 +0200 Subject: [PATCH] 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. --- internal/action/actions.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/action/actions.go b/internal/action/actions.go index a4d6fdea..d69b95e8 100644 --- a/internal/action/actions.go +++ b/internal/action/actions.go @@ -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 }