forgot to move this special case out

This commit is contained in:
Kartik K. Agaram 2022-05-17 23:23:26 -07:00
parent 6e152a9f3f
commit b544e8c357
2 changed files with 5 additions and 3 deletions

View File

@ -167,9 +167,6 @@ function Drawing.keychord_pressed(chord)
Drawing_width = Drawing_width/Zoom
Zoom = 1.5
Drawing_width = Drawing_width*Zoom
elseif chord == 'escape' and love.mouse.isDown('1') then
local drawing = Drawing.current_drawing()
drawing.pending = {}
elseif chord == 'C-f' and not love.mouse.isDown('1') then
Current_drawing_mode = 'freehand'
elseif chord == 'C-g' and not love.mouse.isDown('1') then

View File

@ -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