about summary refs log tree commit diff stats
path: root/main.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-17 23:23:26 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-17 23:23:26 -0700
commitb544e8c3576aec557f384c5d31224c6cfe625de7 (patch)
treea3ec82695236b3bba154431567ed142e3c82c8e3 /main.lua
parent6e152a9f3fc8dcae132874e9ea967bbf211fc5aa (diff)
downloadtext.love-b544e8c3576aec557f384c5d31224c6cfe625de7.tar.gz
forgot to move this special case out
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.lua b/main.lua
index cd65f2d..3279dde 100644
--- a/main.lua
+++ b/main.lua
@@ -152,6 +152,11 @@ end
 function keychord_pressed(chord)
   if love.mouse.isDown('1') or chord:sub(1,2) == 'C-' then
     Drawing.keychord_pressed(chord)
+  elseif chord == 'escape' and love.mouse.isDown('1') then
+    local drawing = Drawing.current_drawing()
+    if drawing then
+      drawing.pending = {}
+    end
   else
     Text.keychord_pressed(chord)
   end