aboutsummaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua30
1 files changed, 16 insertions, 14 deletions
diff --git a/init.lua b/init.lua
index 44f7b13f..1a380f55 100644
--- a/init.lua
+++ b/init.lua
@@ -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