fixed bug with autocompletion and special characters

This commit is contained in:
Manuel Simon Hirsig
2016-01-21 15:13:25 +01:00
parent 52aac7cdb1
commit 357429cbe3
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -9,7 +9,9 @@ function fuzzy(input)
local uppercase_input = strupper(input) local uppercase_input = strupper(input)
local pattern = '(.*)' local pattern = '(.*)'
for i=1,strlen(uppercase_input) do for i=1,strlen(uppercase_input) do
pattern = pattern .. string.sub(uppercase_input, i, i) .. '(.*)' if strfind(string.sub(uppercase_input, i, i), '%a') then
pattern = pattern .. string.sub(uppercase_input, i, i) .. '(.*)'
end
end end
return function(item_name) return function(item_name)
local match = { string.find(strupper(item_name), pattern) } local match = { string.find(strupper(item_name), pattern) }
+1 -1
View File
@@ -1,4 +1,4 @@
AuxVersion = '2.2.21' AuxVersion = '2.2.22'
AuxAuthors = 'shirsig; Zerf; Zirco (Auctionator); Nimeral (Auctionator backport)' AuxAuthors = 'shirsig; Zerf; Zirco (Auctionator); Nimeral (Auctionator backport)'
local lastRightClickAction = GetTime() local lastRightClickAction = GetTime()