diff options
-rw-r--r-- | src/nvim/insexpand.c | 2 | ||||
-rw-r--r-- | test/old/testdir/test_ins_complete.vim | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c index 3d8e083a95..b0fa9146f1 100644 --- 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 index 7fcc4bae36..4d4a17e850 100644 --- 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! |