diff options
author | 2009-01-25 21:09:41 -0500 | |
---|---|---|
committer | 2009-01-25 21:09:41 -0500 | |
commit | 2066415f82ba4fdda8d6f3020024d9fbf997e3da (patch) | |
tree | 4d7f591a9d02ac48ad024a2956f8f13ef26f6a1c /core/ext/command_entry.lua | |
parent | f0dceb28f133d8392c8947155dc8582ec7737783 (diff) | |
download | textadept-2066415f82ba4fdda8d6f3020024d9fbf997e3da.tar.gz textadept-2066415f82ba4fdda8d6f3020024d9fbf997e3da.zip |
Replaced str:match with str:find where applicable for speed improvements.
Diffstat (limited to 'core/ext/command_entry.lua')
-rw-r--r-- | core/ext/command_entry.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/ext/command_entry.lua b/core/ext/command_entry.lua index 29e38bb6..c583dc06 100644 --- a/core/ext/command_entry.lua +++ b/core/ext/command_entry.lua @@ -16,18 +16,18 @@ function ce.get_completions_for(command) if type(tbl) ~= 'table' then return end local cmpls = {} for k in pairs(tbl) do - if type(k) == 'string' and k:match('^'..prefix) then + if type(k) == 'string' and k:find('^'..prefix) then cmpls[#cmpls + 1] = k end end if path == 'buffer' then if o == ':' then for f in pairs(textadept.buffer_functions) do - if f:match('^'..prefix) then cmpls[#cmpls + 1] = f end + if f:find('^'..prefix) then cmpls[#cmpls + 1] = f end end else for p in pairs(textadept.buffer_properties) do - if p:match('^'..prefix) then cmpls[#cmpls + 1] = p end + if p:find('^'..prefix) then cmpls[#cmpls + 1] = p end end end end |