From 5c8bf6b3a6cee37c26806fc7b5c0586f82b7fb6a Mon Sep 17 00:00:00 2001 From: Dmytro Maluka Date: Sat, 15 Jun 2024 20:42:50 +0200 Subject: [PATCH] Improve RemoveAllMultiCursors behavior Use Deselect() in order to place the cursor at the beginning of the selection, not at the end of it, and to refresh its LastVisualX. --- internal/buffer/buffer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/buffer/buffer.go b/internal/buffer/buffer.go index 689d524d..661ea8b5 100644 --- a/internal/buffer/buffer.go +++ b/internal/buffer/buffer.go @@ -1089,7 +1089,7 @@ func (b *Buffer) ClearCursors() { b.cursors = b.cursors[:1] b.UpdateCursors() b.curCursor = 0 - b.GetActiveCursor().ResetSelection() + b.GetActiveCursor().Deselect(true) } // MoveLinesUp moves the range of lines up one row