From 2066415f82ba4fdda8d6f3020024d9fbf997e3da Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 25 Jan 2009 21:09:41 -0500 Subject: Replaced str:match with str:find where applicable for speed improvements. --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'init.lua') 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) -- cgit v1.2.3