diff options
author | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2020-12-15 12:20:55 -0500 |
---|---|---|
committer | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2020-12-15 12:20:55 -0500 |
commit | 2bf2867a5095fa88cbe4c22ba39ad87c04b8b393 (patch) | |
tree | a557fc7f5fb1cf9c46904c45a51cff1381a8174a /modules | |
parent | 7028682c314b636e39d1ab3c74990e27d4666e3c (diff) |
Save the current session prior to loading another one.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/textadept/session.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/textadept/session.lua b/modules/textadept/session.lua index 55a33be8..efadb243 100644 --- a/modules/textadept/session.lua +++ b/modules/textadept/session.lua @@ -52,6 +52,7 @@ function M.load(filename) } if not filename then return end end + if session_file ~= filename then M.save(session_file) end local f = loadfile(filename, 't', {}) if not f or not io.close_all_buffers() then return end -- fail silently local session = f() |