mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
fix(lsp): don't use completion filterText if prefix is empty
Follow up to https://github.com/neovim/neovim/pull/32072 If there is no prefix (e.g. at the start of word boundary or a line), it always used the `filterText` because the `match` function always returned false.
This commit is contained in:

committed by
Mathias Fußenegger

parent
d56ba71af1
commit
5f527f24f0
@@ -231,6 +231,9 @@ end
|
||||
---@param prefix string
|
||||
---@return boolean
|
||||
local function match_item_by_value(value, prefix)
|
||||
if prefix == '' then
|
||||
return true
|
||||
end
|
||||
if vim.o.completeopt:find('fuzzy') ~= nil then
|
||||
return next(vim.fn.matchfuzzy({ value }, prefix)) ~= nil
|
||||
end
|
||||
|
Reference in New Issue
Block a user