use ordinal instead of name for sort matching

This commit is contained in:
Senghan Bright 2021-01-18 14:31:59 +01:00
parent 4f410348ff
commit 78bc319f49

View File

@ -26,7 +26,7 @@ my_sorters.get_substr_matcher = function(opts)
local substr = sorters:new()
substr.highlighter = substr_highlighter
substr.scoring_function = function(_, prompt, _, entry)
local display = entry.name:lower()
local display = entry.ordinal:lower()
local search_terms = util.split(prompt, "%s")
local matched = 0