diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-05-17 22:24:41 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-05-17 22:24:41 -0700 |
commit | 23176de0e045db6592d22981010e74b360d52cc9 (patch) | |
tree | b312865d731e17e2ff9b9f7650df77d4f627aedb | |
parent | 2241f33a8ffa40916a82e2c202fab31913176d99 (diff) | |
download | lines.love-23176de0e045db6592d22981010e74b360d52cc9.tar.gz |
assume we always have a filename
-rw-r--r-- | main.lua | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/main.lua b/main.lua index 6e20cc0..8efcc33 100644 --- a/main.lua +++ b/main.lua @@ -242,9 +242,7 @@ function love.mousereleased(x,y, button) Lines.current = nil end end - if Filename then - save_to_disk(Lines, Filename) - end + save_to_disk(Lines, Filename) end function love.textinput(t) @@ -258,9 +256,7 @@ function love.textinput(t) end Lines[Cursor_line].data = string.sub(Lines[Cursor_line].data, 1, byte_offset)..t..string.sub(Lines[Cursor_line].data, byte_offset+1) Cursor_pos = Cursor_pos+1 - if Filename then - save_to_disk(Lines, Filename) - end + save_to_disk(Lines, Filename) end function keychord_pressed(chord) |