]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0493: Test for patch 9.1.0489 doesn't fail without the fix v9.1.0493
authorzeertzjq <zeertzjq@outlook.com>
Sun, 16 Jun 2024 06:44:05 +0000 (08:44 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 16 Jun 2024 06:44:05 +0000 (08:44 +0200)
Problem:  Test for patch 9.1.0489 doesn't fail without the fix.
Solution: Use "!" flag of feedkeys() so that ex_normal_busy is not set
          and ins_compl_check_keys() is not skipped (zeertzjq).

closes: #15018

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/test_ins_complete.vim
src/version.c

index 51e3c1b5b6394ebb65411f68e630fe084b4a1930..48589ce18887c5e856c4bb5cea332ea8dd67fe40 100644 (file)
@@ -2573,14 +2573,17 @@ func Test_complete_fuzzy_match()
   call feedkeys("S\<C-x>\<C-o>fb\<C-n>", 'tx')
   call assert_equal('fooBaz', g:word)
 
-  " avoid break default completion behavior
+  " avoid breaking default completion behavior
   set completeopt=fuzzy,menu
   call setline(1, ['hello help hero h'])
-  exe "norm! A\<C-X>\<C-N>"
+  " Use "!" flag of feedkeys() so that ex_normal_busy is not set and
+  " ins_compl_check_keys() is not skipped.
+  " Add a "0" after the <Esc> to avoid waiting for an escape sequence.
+  call feedkeys("A\<C-X>\<C-N>\<Esc>0", 'tx!')
   call assert_equal('hello help hero hello', getline('.'))
   set completeopt+=noinsert
   call setline(1, ['hello help hero h'])
-  exe "norm! A\<C-X>\<C-N>"
+  call feedkeys("A\<C-X>\<C-N>\<Esc>0", 'tx!')
   call assert_equal('hello help hero h', getline('.'))
 
   " clean up
index abfcf3f5683cafc6f9b9d9639bfb34e65afb97d5..3817c9b1b4066a6f9014c7a96d3c14558d655533 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    493,
 /**/
     492,
 /**/