From c875f7be46d76650e1c6a16668f77df7227d57d3 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 10 Jun 2022 11:48:32 -0700 Subject: stop saving the entire file when modifying drawings Now we just disallow that entirely. --- undo.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'undo.lua') diff --git a/undo.lua b/undo.lua index 3007070..3504577 100644 --- a/undo.lua +++ b/undo.lua @@ -36,10 +36,8 @@ end -- Make copies of objects; the rest of the app may mutate them in place, but undo requires immutable histories. function snapshot(s,e) -- Snapshot everything by default, but subset if requested. - if s == nil and e == nil then - s = 1 - e = #Lines - elseif e == nil then + assert(s) + if e == nil then e = s end assert(#Lines > 0) -- cgit 1.4.1-2-gfad0