aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2020-12-15 12:20:55 -0500
committerGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2020-12-15 12:20:55 -0500
commit2bf2867a5095fa88cbe4c22ba39ad87c04b8b393 (patch)
treea557fc7f5fb1cf9c46904c45a51cff1381a8174a /modules
parent7028682c314b636e39d1ab3c74990e27d4666e3c (diff)
Save the current session prior to loading another one.
Diffstat (limited to 'modules')
-rw-r--r--modules/textadept/session.lua1
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()