neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit b96c3d9a51ad37500623e45b143335b3d49a12dd
parent 1fb606b2ff68b42f77aad6f9a6e00c37e1b2aab0
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Fri, 21 Feb 2025 08:24:52 +0800

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

https://github.com/vim/vim/commit/3af0a8d8f5b090a6a4b085e7b6ee0f5f87eda399

Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat:
Msrc/nvim/insexpand.c | 2+-
Mtest/old/testdir/test_ins_complete.vim | 8++++++++
2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c @@ -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; } diff --git a/test/old/testdir/test_ins_complete.vim b/test/old/testdir/test_ins_complete.vim @@ -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!