mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 19:48:32 +00:00
vim-patch:9.1.1107: cannot loop through completion menu with fuzzy (#32438)
Problem: cannot loop through completion menu with fuzzy and nosort in
'completeopt'
(Tomasz N)
Solution: Reset cur to zero and update compl_shown_match when
'completeopt' contains "nosort" but not "noselect"
(glepnir)
fixes: vim/vim#16624
closes: vim/vim#16629
c0b7ca406b
Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
@@ -1295,8 +1295,6 @@ static int ins_compl_build_pum(void)
|
||||
if (!compl_no_select) {
|
||||
compl_shown_match = comp;
|
||||
}
|
||||
} else if (!fuzzy_sort && i == 0 && !compl_no_select) {
|
||||
compl_shown_match = shown_compl;
|
||||
}
|
||||
if (!shown_match_ok && comp == compl_shown_match && !compl_no_select) {
|
||||
cur = i;
|
||||
@@ -1327,6 +1325,12 @@ static int ins_compl_build_pum(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fuzzy_filter && !fuzzy_sort && !compl_no_select && !shown_match_ok) {
|
||||
compl_shown_match = shown_compl;
|
||||
shown_match_ok = true;
|
||||
cur = 0;
|
||||
}
|
||||
|
||||
assert(compl_match_arraysize >= 0);
|
||||
compl_match_array = xcalloc((size_t)compl_match_arraysize, sizeof(pumitem_T));
|
||||
|
||||
|
Reference in New Issue
Block a user