diff options
author | 2010-06-16 18:10:13 -0400 | |
---|---|---|
committer | 2010-06-16 18:10:13 -0400 | |
commit | c94eb63139d7ca800a05596157a65f560f610a91 (patch) | |
tree | dbfe3a8e3e48f2467fad3fe487fb0ac64aafce5c /init.lua | |
parent | 5245d1b62be50ebb2efc266eaf579b3d32a49e1f (diff) | |
download | textadept-c94eb63139d7ca800a05596157a65f560f610a91.tar.gz textadept-c94eb63139d7ca800a05596157a65f560f610a91.zip |
Code and documentation cleanup.
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |