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.
This commit is contained in:
Kartik K. Agaram 2022-06-20 13:22:55 -07:00
parent 0d1e6aacd9
commit 5a0b6c6a58
1 changed files with 1 additions and 0 deletions

View File

@ -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