Patch 9.0.1550
Problem:    In cmdline window S-Tab does not select previous completion.
            (Maxim Kim)
Solution:   Add a mappint for S-Tab. (closes #12116)
Files:      src/ex_getln.c, src/testdir/test_cmdwin.vim


*** ../vim-9.0.1549/src/ex_getln.c      2023-04-17 15:53:20.353762946 +0100
--- src/ex_getln.c      2023-05-13 13:53:34.098103096 +0100
***************
*** 4486,4493 ****
--- 4486,4497 ----
      {
        if (p_wc == TAB)
        {
+           // Make Tab start command-line completion: CTRL-X CTRL-V
            add_map((char_u *)"<buffer> <Tab> <C-X><C-V>", MODE_INSERT, TRUE);
            add_map((char_u *)"<buffer> <Tab> a<C-X><C-V>", MODE_NORMAL, TRUE);
+ 
+           // Make S-Tab work like CTRL-P in command-line completion
+           add_map((char_u *)"<buffer> <S-Tab> <C-P>", MODE_INSERT, TRUE);
        }
        set_option_value_give_err((char_u *)"ft",
                                               0L, (char_u *)"vim", OPT_LOCAL);
*** ../vim-9.0.1549/src/testdir/test_cmdwin.vim 2022-10-05 11:24:42.228494178 
+0100
--- src/testdir/test_cmdwin.vim 2023-05-13 13:52:54.870116226 +0100
***************
*** 359,364 ****
--- 359,380 ----
    set wildmenu& wildchar&
  endfunc
  
+ func Test_cmdwin_cmd_completion()
+   set wildmenu wildchar=<Tab>
+   com! -nargs=* -complete=command SomeOne echo 'one'
+   com! -nargs=* -complete=command SomeTwo echo 'two'
+   call feedkeys("q:aSome\<Tab>\<Home>\"\<CR>", 'tx')
+   call assert_equal('"SomeOne', @:)
+   call feedkeys("q:aSome\<Tab>\<Tab>\<Home>\"\<CR>", 'tx')
+   call assert_equal('"SomeTwo', @:)
+   call feedkeys("q:aSome\<Tab>\<Tab>\<S-Tab>\<Home>\"\<CR>", 'tx')
+   call assert_equal('"SomeOne', @:)
+ 
+   delcom SomeOne
+   delcom SomeTwo
+   set wildmenu& wildchar&
+ endfunc
+ 
  func Test_cmdwin_ctrl_bsl()
    " Using CTRL-\ CTRL-N in cmd window should close the window
    call feedkeys("q:\<C-\>\<C-N>", 'xt')
*** ../vim-9.0.1549/src/version.c       2023-05-13 12:15:53.436821646 +0100
--- src/version.c       2023-05-13 13:54:27.250086007 +0100
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1550,
  /**/

-- 
What a wonderfully exciting cough!  Do you mind if I join you?
                -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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 on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230513125539.9449D1C1B21%40moolenaar.net.

Raspunde prin e-mail lui