about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-07-10 17:14:38 -0700
committerKartik K. Agaram <vc@akkartik.com>2023-07-10 17:14:38 -0700
commit7f4c5f847b1e7e812d0abc255444b70341e4a827 (patch)
tree88ac6b5e4c88ded1b16d06c90a9c9ec5b10e30e1
parenta8747478ff6452c8bce106ffc9d889886ab202a8 (diff)
downloadlines.love-7f4c5f847b1e7e812d0abc255444b70341e4a827.tar.gz
simplify saving settings
We don't ever call one app's settings while Current_app is the other.
-rw-r--r--run.lua4
-rw-r--r--source.lua6
2 files changed, 2 insertions, 8 deletions
diff --git a/run.lua b/run.lua
index 59522a5..9a90b61 100644
--- a/run.lua
+++ b/run.lua
@@ -153,9 +153,7 @@ function run.settings()
   if Settings == nil then
     Settings = {}
   end
-  if Current_app == 'run' then
-    Settings.x, Settings.y, Settings.displayindex = App.screen.position()
-  end
+  Settings.x, Settings.y, Settings.displayindex = App.screen.position()
   return {
     x=Settings.x, y=Settings.y, displayindex=Settings.displayindex,
     width=App.screen.width, height=App.screen.height,
diff --git a/source.lua b/source.lua
index 2d48481..cfd38fa 100644
--- a/source.lua
+++ b/source.lua
@@ -273,11 +273,7 @@ function source.quit()
 end
 
 function source.settings()
-  if Current_app == 'source' then
---?     print('reading source window position')
-    Settings.source.x, Settings.source.y, Settings.source.displayindex = App.screen.position()
-  end
---?   print('saving source settings', Settings.source.x, Settings.source.y, Settings.source.displayindex)
+  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 {
     x=Settings.source.x, y=Settings.source.y, displayindex=Settings.source.displayindex,