bugfix: hit 'clear' with text selected

Before this commit, selecting some text and then hitting the 'clear'
button would crash the app.
This commit is contained in:
Kartik K. Agaram 2023-12-01 19:53:14 -08:00
parent 750ef9d54d
commit 5875196422
1 changed files with 1 additions and 0 deletions

View File

@ -399,6 +399,7 @@ function edit.clear(State)
Text.redraw_all(State)
State.cursor1 = {line=1, pos=1}
State.screen_top1 = {line=1, pos=1}
State.selection1 = {}
end
function edit.key_release(State, key, scancode)