about summary refs log tree commit diff stats
path: root/source.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-07-10 17:16:58 -0700
committerKartik K. Agaram <vc@akkartik.com>2023-07-10 17:16:58 -0700
commitbca7f8259802d6f6751dbe265dc0b27d7fac7589 (patch)
tree77193a5afe2782f73e2494fed3136ef74a24361b /source.lua
parent7f4c5f847b1e7e812d0abc255444b70341e4a827 (diff)
downloadlines.love-bca7f8259802d6f6751dbe265dc0b27d7fac7589.tar.gz
standardize between run and source some more
We shouldn't be thinking about saving settings when we're initializing
window geometry.
Diffstat (limited to 'source.lua')
-rw-r--r--source.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/source.lua b/source.lua
index cfd38fa..4768865 100644
--- a/source.lua
+++ b/source.lua
@@ -179,10 +179,6 @@ function source.initialize_window_geometry(em_width)
   App.screen.width, App.screen.height, App.screen.flags = App.screen.size()
   App.screen.flags.resizable = true
   App.screen.resize(App.screen.width, App.screen.height, App.screen.flags)
-  print('initializing source position')
-  if Settings == nil then Settings = {} end
-  if Settings.source == nil then Settings.source = {} end
-  Settings.source.x, Settings.source.y, Settings.source.displayindex = App.screen.position()
 end
 
 function source.resize(w, h)
@@ -273,6 +269,8 @@ function source.quit()
 end
 
 function source.settings()
+  if Settings == nil then Settings = {} end
+  if Settings.source == nil then Settings.source = {} end
   Settings.source.x, Settings.source.y, Settings.source.displayindex = App.screen.position()
   File_navigation.cursors[Editor_state.filename] = {cursor1=Editor_state.cursor1, screen_top1=Editor_state.screen_top1}
   return {