From df6d96234ab1d4100f9c86db35ba49952e83e57e Mon Sep 17 00:00:00 2001 From: EnumDev Date: Tue, 10 Jun 2025 20:46:04 +0300 Subject: [PATCH] Fix buffer cursor reacting to up arrow in wrong cursor mode --- src/window.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/window.go b/src/window.go index 5acf9d8..279668a 100644 --- a/src/window.go +++ b/src/window.go @@ -226,12 +226,12 @@ func (window *Window) input(ev *tcell.EventKey) { window.SetCursorPos(window.CurrentBuffer.CursorPos - 1) } } else if ev.Key() == tcell.KeyUp { - // Move cursor - x, y := window.GetCursorPos2D() - window.SetCursorPos2D(x, y-1) if window.CursorMode == CursorModeBuffer { // Get original cursor position pos := window.CurrentBuffer.CursorPos + // Move cursor + x, y := window.GetCursorPos2D() + window.SetCursorPos2D(x, y-1) // Add to selection if ev.Modifiers() == tcell.ModShift { // Add to selection