From e3fbc4ec101480228f99a44aa37f92ff1ca5a441 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sat, 22 Aug 2009 21:02:16 -0400 Subject: Close all buffers before loading a session; modules/textadept/session.lua --- modules/textadept/session.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/textadept/session.lua b/modules/textadept/session.lua index dd737cb5..dea9e432 100644 --- a/modules/textadept/session.lua +++ b/modules/textadept/session.lua @@ -28,7 +28,7 @@ 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 then return false end + if not f or not textadept.io.close_all() then return false end local current_view, splits = 1, { [0] = {} } for line in f:lines() do if not only_pm then -- cgit v1.2.3