patch 9.1.1744: tests: Test_skip_wildtrigger_hist_navigation() may fail

Commit: 
https://github.com/vim/vim/commit/3980c865250c9653ce63355f860ea1ccd5c6d0ee
Author: Girish Palya <[email protected]>
Date:   Mon Sep 8 15:47:25 2025 -0400

    patch 9.1.1744: tests: Test_skip_wildtrigger_hist_navigation() may fail
    
    Problem:  tests: Test_skip_wildtrigger_hist_navigation() may fail
              (zeertzjq).
    Solution: Correct test to validate intended behavior (Girish Palya).
    
    See https://github.com/vim/vim/pull/18219#issuecomment-3265183318
    
    closes: #18243
    
    Signed-off-by: Girish Palya <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index 8e842d128..22e2c00a3 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -5062,25 +5062,30 @@ endfunc
 " Skip wildmenu during history navigation via Up/Down keys
 func Test_skip_wildtrigger_hist_navigation()
   call test_override("char_avail", 1)
-  cnoremap <F8> <C-R>=wildtrigger()[-1]<CR>
-  set wildmenu
-
-  call feedkeys(":ech\<F8>\<F4>\<C-B>\"\<CR>", "tx")
-  call assert_match('echo*', g:Sline)
-  call assert_equal('"echo', @:)
+  set wildmenu wildmode=noselect,full
+  augroup TestSkipWildtrigger | autocmd!
+    autocmd CmdlineChanged : call wildtrigger()
+  augroup END
+  cnoremap <expr> <Up>   wildmenumode() ? "\<C-E>\<Up>"   : "\<Up>"
+  cnoremap <expr> <Down> wildmenumode() ? "\<C-E>\<Down>" : "\<Down>"
 
   call feedkeys(":echom \"foo\"", "tx")
   call feedkeys(":echom \"foobar\"", "tx")
-  call feedkeys(":ech\<F8>\<C-E>\<UP>\<C-B>\"\<CR>", "tx")
+
+  call feedkeys(":ech\<Up>\<C-B>\"\<CR>", "tx")
   call assert_equal('"echom "foobar"', @:)
-  call feedkeys(":ech\<F8>\<C-E>\<UP>\<UP>\<UP>\<C-B>\"\<CR>", "tx")
+  call feedkeys(":ech\<Up>\<Up>\<C-B>\"\<CR>", "tx")
   call assert_equal('"echom "foo"', @:)
-  call feedkeys(":ech\<F8>\<C-E>\<UP>\<UP>\<UP>\<Down>\<C-B>\"\<CR>", "tx")
+  call feedkeys(":ech\<Up>\<Up>\<Down>\<C-B>\"\<CR>", "tx")
   call assert_equal('"echom "foobar"', @:)
+  call feedkeys(":ech\<Up>\<Up>\<Down>\<Down>\<C-B>\"\<CR>", "tx")
+  call assert_equal('"ech', @:)
 
   call test_override("char_avail", 0)
-  set wildmenu&
-  cunmap <F8>
+  set wildmenu& wildmode& wildoptions&
+  augroup TestSkipWildtrigger | autocmd! | augroup END
+  cunmap <Up>
+  cunmap <Down>
 endfunc
 
 " vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/version.c b/src/version.c
index 20ee00095..ca232eef1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -724,6 +724,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1744,
 /**/
     1743,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1uvi22-00C97T-JJ%40256bit.org.

Raspunde prin e-mail lui