diff options
Diffstat (limited to 'drawing.lua')
-rw-r--r-- | drawing.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drawing.lua b/drawing.lua index f3433a0..6718cf7 100644 --- a/drawing.lua +++ b/drawing.lua @@ -348,7 +348,10 @@ function Drawing.mouse_released(x,y, button) end end save_to_disk(Lines, Filename) - record_undo_event({before=Drawing.before, after=snapshot_everything()}) + if Drawing.before then + record_undo_event({before=Drawing.before, after=snapshot_everything()}) + Drawing.before = nil + end end function Drawing.keychord_pressed(chord) |