aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/session.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2009-10-09 14:04:53 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2009-10-09 14:04:53 -0400
commitce6dd6da7ca6fa9347851f917aafd2a7d71eaf74 (patch)
tree038944fcf0e04bfe85ffe8d9d3aee49643f661ff /modules/textadept/session.lua
parent31ce7f4fd53bf5fd79caf44e4e31e6f8c8eff440 (diff)
downloadtextadept-ce6dd6da7ca6fa9347851f917aafd2a7d71eaf74.tar.gz
textadept-ce6dd6da7ca6fa9347851f917aafd2a7d71eaf74.zip
Don't clear cmdline files when loading pm session; modules/textadept/session.lua
Diffstat (limited to 'modules/textadept/session.lua')
-rw-r--r--modules/textadept/session.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/textadept/session.lua b/modules/textadept/session.lua
index dea9e432..95251c9c 100644
--- a/modules/textadept/session.lua
+++ b/modules/textadept/session.lua
@@ -28,7 +28,9 @@ DEFAULT_SESSION = _USERHOME..'/session'
-- @usage _m.textadept.session.load(filename)
function load(filename, only_pm)
local f = io.open(filename or DEFAULT_SESSION, 'rb')
- if not f or not textadept.io.close_all() then return false end
+ if not only_pm and not f then
+ if not textadept.io.close_all() then return false end
+ end
local current_view, splits = 1, { [0] = {} }
for line in f:lines() do
if not only_pm then