diff options
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 30 |
1 files changed, 16 insertions, 14 deletions
@@ -14,20 +14,22 @@ require 'textadept' require 'ext/key_commands' --- process command line arguments -local textadept = textadept -if #arg == 0 then - textadept.io.load_session() -else - local base_dir = arg[0]:match('^.+/') or '' - local filepath - for _, filename in ipairs(arg) do - if not filename:match('^~?/') then - textadept.io.open(base_dir..filename) - else - textadept.io.open(filename) +if not RESETTING then + -- process command line arguments + local textadept = textadept + if #arg == 0 then + textadept.io.load_session() + else + local base_dir = arg[0]:match('^.+/') or '' + local filepath + for _, filename in ipairs(arg) do + if not filename:match('^~?/') then + textadept.io.open(base_dir..filename) + else + textadept.io.open(filename) + end end + textadept.pm.entry_text = 'buffers' + textadept.pm.activate() end - textadept.pm.entry_text = 'buffers' - textadept.pm.activate() end |