Skip to content

Commit

Permalink
fix: keep correct case for prefix match in popupmenu
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 18, 2022
1 parent b10bbbb commit 4757fd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/noice/ui/popupmenu/nui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ end
function M.format_abbr(item, prefix)
local text = item.abbr or item.word
if prefix and text:lower():find(prefix:lower(), 1, true) == 1 then
item.text:append(prefix, "NoicePopupmenuMatch")
item.text:append(text:sub(1, #prefix), "NoicePopupmenuMatch")
item.text:append(text:sub(#prefix + 1), "NoiceCompletionItemWord")
else
item.text:append(text, "NoiceCompletionItemWord")
Expand Down

0 comments on commit 4757fd9

Please sign in to comment.