about summary refs log tree commit diff stats
path: root/edit.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-03-18 23:12:50 -0700
committerKartik K. Agaram <vc@akkartik.com>2023-03-18 23:12:50 -0700
commitfceb2404fb42475d53a23e6babdf7307c192c0c1 (patch)
tree21074faf9f2f25e7450485d93507f653f5558f6c /edit.lua
parentf7f5973cb7b0e09e0cc0f98868c01830f3cfa95d (diff)
downloadtext.love-fceb2404fb42475d53a23e6babdf7307c192c0c1.tar.gz
move default file location
This works better on mobile platforms while seeming about as useful
anywhere else.

I've verified that anyone who already edited a file will continue to use
its path from settings.
Diffstat (limited to 'edit.lua')
-rw-r--r--edit.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/edit.lua b/edit.lua
index 715fd1a..60561bf 100644
--- a/edit.lua
+++ b/edit.lua
@@ -94,7 +94,7 @@ function edit.initialize_state(top, left, right, font_height, line_height)  -- c
     right = math.floor(right),
     width = right-left,
 
-    filename = love.filesystem.getUserDirectory()..'/lines.txt',  -- '/' should work even on Windows
+    filename = love.filesystem.getSourceBaseDirectory()..'/lines.txt',  -- '/' should work even on Windows
     next_save = nil,
 
     -- undo