From 5a0b6c6a5804c22a7fe62300ff10b8bf890f083a Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 20 Jun 2022 13:22:55 -0700 Subject: better fix for commit 3ffc2ed8f I'm giving up finding a more generalized solution. The issue is that we need the correct selection state right up to the point where we modify Lines, in order to capture precise undo state. Hopefully there aren't any other keychords that should clear the selection. --- text.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/text.lua b/text.lua index 8753a7b..5dbecc9 100644 --- a/text.lua +++ b/text.lua @@ -172,6 +172,7 @@ function Text.keychord_pressed(chord) local before_line = Cursor1.line local before = snapshot(before_line) Text.insert_return() + Selection1 = {} if (Cursor_y + Line_height) > App.screen.height then Text.snap_cursor_to_bottom_of_screen() end -- cgit 1.4.1-2-gfad0