Case insensitive search

This commit is contained in:
osmarks 2018-08-13 11:19:53 +01:00
parent 4a6c9a99e5
commit fca24f31c3

View File

@ -98,7 +98,7 @@ end
local function search(query, threshold)
local threshold = threshold or 4
local results = find(function(item)
local distance = d.distance(query, item.display_name)
local distance = d.distance(string.lower(query), string.lower(item.display_name))
if distance < threshold then
return true, distance
else return false end