about summary refs log tree commit diff stats
path: root/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.lua b/main.lua
index a6b0d73..9372207 100644
--- a/main.lua
+++ b/main.lua
@@ -65,6 +65,10 @@ Zoom = 1.5
 
 Filename = love.filesystem.getUserDirectory()..'/lines.txt'
 
+-- undo
+History = {}
+Next_history = 1
+
 end  -- App.initialize_globals
 
 function App.initialize(arg)
@@ -102,6 +106,7 @@ function App.initialize(arg)
 end  -- App.initialize
 
 function App.filedropped(file)
+  App.initialize_globals()  -- in particular, forget all undo history
   Filename = file:getFilename()
   file:open('r')
   Lines = load_from_file(file)