From 5875196422e338b66558d85ad11aa25616c07f8c Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 1 Dec 2023 19:53:14 -0800 Subject: [PATCH] bugfix: hit 'clear' with text selected Before this commit, selecting some text and then hitting the 'clear' button would crash the app. --- edit.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/edit.lua b/edit.lua index ab8cf7a..1b42a3b 100644 --- a/edit.lua +++ b/edit.lua @@ -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)