Skip to content

Commit 200d391

Browse files
authored
editor_gui: Fix broken case-insensitive search (#686)
* Fix broken case insensitivee previously the old method was making the search term lowercase leaving the map name in the original case * utf8.lower instead of string.lower
1 parent fec80d5 commit 200d391

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

[editor]/editor_gui/client/load.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,8 @@ function openSearch()
7575
guiGridListSetItemText ( loadDialog.mapsList, row, 3, res["version"], false, false )
7676
end
7777
else
78-
local escapedText = string.gsub(string.lower(text), "([%-%.%+%*%?%[%]%^%$%(%)%%])", "%%%1")
7978
for i,res in ipairs(openResources) do
80-
if string.find(res["friendlyName"], escapedText) then
79+
if utf8.find(utf8.lower(res["friendlyName"]), utf8.lower(text), 1, true) then
8180
local row = guiGridListAddRow ( loadDialog.mapsList )
8281
guiGridListSetItemText ( loadDialog.mapsList, row, 1, res["friendlyName"], false, false )
8382
guiGridListSetItemText ( loadDialog.mapsList, row, 2, res["gamemodes"], false, false )

0 commit comments

Comments
 (0)