bugfix in commit e51ce12969
Any time I press a ctrl- chord LÖVE actually sees two key chords: C-lctrl C-... (the real one) But it's not just that. There's also a lot in the codebase that's just habit-based. I need more tests.
This commit is contained in:
parent
ff88238ff1
commit
ff88a2a927
10
main.lua
10
main.lua
|
@ -449,10 +449,12 @@ function App.keychord_pressed(chord)
|
||||||
elseif love.mouse.isDown('1') or chord:sub(1,2) == 'C-' then
|
elseif love.mouse.isDown('1') or chord:sub(1,2) == 'C-' then
|
||||||
-- DON'T reset line.y here
|
-- DON'T reset line.y here
|
||||||
local drawing_index, drawing = Drawing.current_drawing()
|
local drawing_index, drawing = Drawing.current_drawing()
|
||||||
local before = snapshot(drawing_index)
|
if drawing_index then
|
||||||
Drawing.keychord_pressed(chord)
|
local before = snapshot(drawing_index)
|
||||||
record_undo_event({before=before, after=snapshot(drawing_index)})
|
Drawing.keychord_pressed(chord)
|
||||||
save_to_disk(Lines, Filename)
|
record_undo_event({before=before, after=snapshot(drawing_index)})
|
||||||
|
save_to_disk(Lines, Filename)
|
||||||
|
end
|
||||||
elseif chord == 'escape' and love.mouse.isDown('1') then
|
elseif chord == 'escape' and love.mouse.isDown('1') then
|
||||||
local _,drawing = Drawing.current_drawing()
|
local _,drawing = Drawing.current_drawing()
|
||||||
if drawing then
|
if drawing then
|
||||||
|
|
Loading…
Reference in New Issue