]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1125: cannot loop through pum menu with multiline items v9.1.1125
authorglepnir <glephunter@gmail.com>
Thu, 20 Feb 2025 21:06:16 +0000 (22:06 +0100)
committerChristian Brabandt <cb@256bit.org>
Thu, 20 Feb 2025 21:06:16 +0000 (22:06 +0100)
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: #16641
closes: #16674

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/insexpand.c
src/testdir/test_ins_complete.vim
src/version.c

index f696097f31c89ef640c02ffc2af29883ebfbd3b6..f28015602927fb8cfcd6d3b35b21d9a84c1ca492 100644 (file)
@@ -1368,7 +1368,7 @@ ins_compl_build_pum(void)
                        compl_shown_match = compl;
                }
 
-               if (!shown_match_ok && compl == compl_shown_match && !compl_no_select)
+               if (!shown_match_ok && compl == compl_shown_match)
                {
                    cur = i;
                    shown_match_ok = TRUE;
index be7d80269ed0842058b6677793e79b8022b19972..4ecf2893dab477e011e832095947cdc28d144bfb 100644 (file)
@@ -2891,6 +2891,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!
index 33640818faa0a0890b34ed200c4c9075aa7a7d0b..8d044d199947a1ecc88d86d7dd5c693354ec633b 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1125,
 /**/
     1124,
 /**/