diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-05-15 14:47:26 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-05-15 14:47:26 -0700 |
commit | 8a6d3ce799e18774e1ef40af1127359fa2236808 (patch) | |
tree | 6fb7097050356bd0a55ab297f92f2721390c2640 | |
parent | 4158eee7f6667bdf24a6109e086ea3a819a6eb1c (diff) | |
download | lines.love-8a6d3ce799e18774e1ef40af1127359fa2236808.tar.gz |
delete drawing using backspace
I solemnly swear that I am aware of the risk of data loss..
-rw-r--r-- | main.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/main.lua b/main.lua index e865193..c56a290 100644 --- a/main.lua +++ b/main.lua @@ -471,6 +471,8 @@ function keychord_pressed(chord) elseif chord == 'backspace' then if #lines > 1 and lines[#lines] == '' then table.remove(lines) + elseif type(lines[#lines]) == 'table' then + table.remove(lines) -- we'll add undo soon else local byteoffset = utf8.offset(lines[#lines], -1) if byteoffset then |