aboutsummaryrefslogtreecommitdiffhomepage
path: root/init.lua
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2009-01-25 21:09:41 -0500
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2009-01-25 21:09:41 -0500
commit2066415f82ba4fdda8d6f3020024d9fbf997e3da (patch)
tree4d7f591a9d02ac48ad024a2956f8f13ef26f6a1c /init.lua
parentf0dceb28f133d8392c8947155dc8582ec7737783 (diff)
Replaced str:match with str:find where applicable for speed improvements.
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index 34bbd0fc..4159e1c3 100644
--- a/init.lua
+++ b/init.lua
@@ -44,7 +44,7 @@ if not RESETTING then
end
-- process command line arguments
- if MAC and arg[1] and arg[1]:match('^%-psn_0') then
+ if MAC and arg[1] and arg[1]:find('^%-psn_0') then
table.remove(arg, 1)
end
if #arg == 0 then
@@ -53,7 +53,7 @@ if not RESETTING then
local base_dir = arg[0]:match('^.+/') or ''
local filepath
for _, filename in ipairs(arg) do
- if not filename:match('^~?/') then
+ if not filename:find('^~?/') then
textadept.io.open(base_dir..filename)
else
textadept.io.open(filename)