summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/main.lua b/main.lua
index c63d538..560a376 100644
--- a/main.lua
+++ b/main.lua
@@ -521,13 +521,21 @@ local function update_search_matches()
return
end
+ -- no utf8 :(
+ local case_sensitive = not not menu.search_text:find('%u')
+
local options = {}
for _, v in ipairs(menu.search_options) do
local matches = {}
+ local name = v.name
+ if not case_sensitive then
+ name = name:lower()
+ end
+
local i, j = 0, 0
while true do
- i, j = v.name:find(menu.search_text, j + 1, true)
+ i, j = name:find(menu.search_text, j + 1, true)
if not i then
break
end