about summary refs log tree commit diff stats
path: root/source.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2024-01-12 03:33:13 -0800
committerKartik K. Agaram <vc@akkartik.com>2024-01-12 03:35:22 -0800
commit5d4fd4aa93918ae2139a581bae4d9f9579359281 (patch)
treec7f6f9e0bafa97117745e2b882c03f7cbc1ba02c /source.lua
parent57fb2d4b57db3fef5245d40e16f5ea811c3806a4 (diff)
downloadtext.love-5d4fd4aa93918ae2139a581bae4d9f9579359281.tar.gz
fix still more issues with the previous scenario
- source editor always expects relative paths
- refresh mocked data

There's still one issue after this: the font size saved in the config
file is the one we use in tests. More broadly, Editor_state is
completely wrong.

Ideally I'd just not save any settings for the source editor if the
tests fail.
Diffstat (limited to 'source.lua')
-rw-r--r--source.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/source.lua b/source.lua
index 1aa1f74..a4b3603 100644
--- a/source.lua
+++ b/source.lua
@@ -271,6 +271,7 @@ 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()
+  App.screen.width, App.screen.height = App.screen.size()
   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,