You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When completing cmdline with :set foldmethod= completion shows up but when select_next/select_prev is issued using <C-N> or <DOWN> (or <C-P> or <UP>), existing word foldmethod= gets removed. Other keys like <C-Space>, <C-E>, etc work fine and don't remove existing word.
Bug is reproducible with only blink.cmp and lazy.nvim being only two plugins enabled.
@@ -81,14 +81,14 @@ function cmdline:get_completions(context, callback)
-- remove prefix from the filter text
local filter_text = completion
- if has_prefix then filter_text = completion:sub(#current_arg_prefix + 1) end+ if has_prefix and cmd == 'lua' then filter_text = completion:sub(#current_arg_prefix + 1) end
-- for lua, use the filter text as the label since it doesn't include the prefix
local label = cmd == 'lua' and filter_text or completion
-- add prefix to the newText
local new_text = completion
- if not has_prefix then new_text = current_arg_prefix .. completion end+ if not has_prefix and cmd == 'lua' then new_text = current_arg_prefix .. completion end
table.insert(items, {
label = label,
In this commit, to resolve #1075, the prefixes for all non :lua commands were ignored, which resulted in the various issues mentioned above. A more suitable approach might be to determine whether to ignore the prefix based on different completion types.
Make sure you have done the following
blink.cmp
<C-k>
on https://cmp.saghen.dev)Bug Description
When completing
cmdline
with:set foldmethod=
completion shows up but whenselect_next
/select_prev
is issued using<C-N>
or<DOWN>
(or<C-P>
or<UP>
), existing wordfoldmethod=
gets removed. Other keys like<C-Space>
,<C-E>
, etc work fine and don't remove existing word.Bug is reproducible with only
blink.cmp
andlazy.nvim
being only two plugins enabled.Example:
Just after typing
:set foldmethod=
After further typing
<C-N>
Relevant configuration
neovim
versionNVIM v0.10.3 Build type: Release LuaJIT 2.1.1736781742 Run "nvim -V1 -v" for more info
blink.cmp
versioncommit b6f11a0
The text was updated successfully, but these errors were encountered: