about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-06-18 16:25:20 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-06-18 16:26:45 -0700
commit2a26a260bbf20d8dfdf6797f7278243b757c1029 (patch)
tree9e609e9787a02d1c40725a0c8880a017f03a0fb0
parentc15ee0b4a06e68f095c3667d62305c3178a68562 (diff)
downloadview.love-2a26a260bbf20d8dfdf6797f7278243b757c1029.tar.gz
make sure to save right when quitting
I just noticed a few characters missing from one of my notes.
-rw-r--r--main.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.lua b/main.lua
index 9624012..196ef5a 100644
--- a/main.lua
+++ b/main.lua
@@ -317,6 +317,11 @@ function schedule_save()
   end
 end
 
+-- make sure to save before quitting
+function love.quit()
+  save_to_disk(Lines, Filename)
+end
+
 function App.mousepressed(x,y, mouse_button)
   if Search_term then return end
   propagate_to_button_handlers(x,y, mouse_button)