about summary refs log tree commit diff stats
path: root/undo.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-06-10 11:48:32 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-06-10 11:48:32 -0700
commitc875f7be46d76650e1c6a16668f77df7227d57d3 (patch)
treec67b443c57356842bbe2c3992699ff7940f4f8c2 /undo.lua
parent79a12413700dca5816d6c27fc4951bdd7579e329 (diff)
downloadtext.love-c875f7be46d76650e1c6a16668f77df7227d57d3.tar.gz
stop saving the entire file when modifying drawings
Now we just disallow that entirely.
Diffstat (limited to 'undo.lua')
-rw-r--r--undo.lua6
1 files changed, 2 insertions, 4 deletions
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)