vim-patch:9.1.1125: cannot loop through pum menu with multiline items (#32543)

Problem:  cannot loop through pum menu with multiline items with
          fuzzy and noselect in 'completeopt' (Tomasz N)
Solution: remove unnecessary compl_no_select condition (glepnir)

fixes: vim/vim#16641
closes: vim/vim#16674

3af0a8d8f5

Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
zeertzjq
2025-02-21 08:24:52 +08:00
committed by GitHub
parent 1fb606b2ff
commit b96c3d9a51
2 changed files with 9 additions and 1 deletions

View File

@@ -1296,7 +1296,7 @@ static int ins_compl_build_pum(void)
compl_shown_match = comp;
}
}
if (!shown_match_ok && comp == compl_shown_match && !compl_no_select) {
if (!shown_match_ok && comp == compl_shown_match) {
cur = i;
shown_match_ok = true;
}

View File

@@ -2873,6 +2873,14 @@ func Test_complete_fuzzy_match()
call assert_equal("for", g:abbr)
call assert_equal(2, g:selected)
set cot=menu,menuone,noselect,fuzzy
call feedkeys("i\<C-R>=CompAnother()\<CR>\<C-N>\<C-N>\<C-N>\<C-N>", 'tx')
call assert_equal("foo", g:word)
call feedkeys("i\<C-R>=CompAnother()\<CR>\<C-P>", 'tx')
call assert_equal("foo", g:word)
call feedkeys("i\<C-R>=CompAnother()\<CR>\<C-P>\<C-P>", 'tx')
call assert_equal("for", g:abbr)
" clean up
set omnifunc=
bw!