diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-06-27 17:36:10 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-06-27 17:36:10 -0700 |
commit | 938e3ca1bb1ab20a6f0743121e1e60960efdfa64 (patch) | |
tree | b2563ec81eba24de693c8d40d199fca3bb4595a1 | |
parent | e63878897ef09ee0eb932c50eee2befe3402e192 (diff) | |
download | view.love-938e3ca1bb1ab20a6f0743121e1e60960efdfa64.tar.gz |
when naming points, allow backspacing back to ''
-rw-r--r-- | main.lua | 1 |
1 files changed, 1 insertions, 0 deletions
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 |