From 938e3ca1bb1ab20a6f0743121e1e60960efdfa64 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 27 Jun 2022 17:36:10 -0700 Subject: when naming points, allow backspacing back to '' --- main.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'main.lua') diff --git a/main.lua b/main.lua index 71c7e4d..22ef6e7 100644 --- a/main.lua +++ b/main.lua @@ -552,6 +552,7 @@ function App.keychord_pressed(chord, key) elseif chord == 'backspace' then local len = utf8.len(p.name) local byte_offset = Text.offset(p.name, len-1) + if len == 1 then byte_offset = 0 end p.name = string.sub(p.name, 1, byte_offset) record_undo_event({before=before, after=snapshot(Lines.current_drawing_index)}) end -- cgit 1.4.1-2-gfad0