aboutsummaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2010-06-16 18:10:13 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2010-06-16 18:10:13 -0400
commitc94eb63139d7ca800a05596157a65f560f610a91 (patch)
treedbfe3a8e3e48f2467fad3fe487fb0ac64aafce5c /init.lua
parent5245d1b62be50ebb2efc266eaf579b3d32a49e1f (diff)
downloadtextadept-c94eb63139d7ca800a05596157a65f560f610a91.tar.gz
textadept-c94eb63139d7ca800a05596157a65f560f610a91.zip
Code and documentation cleanup.
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/init.lua b/init.lua
index 46e3db83..effeb987 100644
--- a/init.lua
+++ b/init.lua
@@ -19,7 +19,7 @@ if not RESETTING then
local P, C = lpeg.P, lpeg.C
local param = P('"') * C((1 - P('"'))^0) * '"' + C((1 - P(' '))^1)
local args = lpeg.match(lpeg.Ct(param * (P(' ') * param)^0), arg[0])
- for _, a in ipairs(args) do arg[#arg + 1] = a end
+ for i = 1, #args do arg[#arg + 1] = args[i] end
end
-- process command line arguments
@@ -28,7 +28,8 @@ if not RESETTING then
_m.textadept.session.load()
else
-- process command line switches
- for i, switch in ipairs(arg) do
+ for i = 1, #arg do
+ local switch = arg[i]
if switch == '-ns' or switch == '--no-session' then
_m.textadept.session.SAVE_ON_QUIT = false
table.remove(arg, i)
@@ -36,6 +37,6 @@ if not RESETTING then
end
-- open files
- for _, filename in ipairs(arg) do io.open_file(filename) end
+ for i = 1, #arg do io.open_file(arg[i]) end
end
end