mirror of
https://github.com/neovim/neovim.git
synced 2025-11-16 07:11:20 +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
@@ -239,13 +239,18 @@ describe('vim.lsp.completion: item conversion', function()
|
||||
},
|
||||
},
|
||||
}
|
||||
local expected = {
|
||||
assert_completion_matches('<mo', items, {
|
||||
{
|
||||
abbr = 'module',
|
||||
word = '<module',
|
||||
},
|
||||
}
|
||||
assert_completion_matches('<mo', items, expected)
|
||||
})
|
||||
assert_completion_matches('', items, {
|
||||
{
|
||||
abbr = 'module',
|
||||
word = 'module',
|
||||
},
|
||||
})
|
||||
end)
|
||||
|
||||
it('fuzzy matches on label when filterText is missing', function()
|
||||
|
||||
Reference in New Issue
Block a user