To: vim_dev@googlegroups.com Subject: Patch 9.0.1550 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 *)" ", MODE_INSERT, TRUE); add_map((char_u *)" a", MODE_NORMAL, TRUE); + + // Make S-Tab work like CTRL-P in command-line completion + add_map((char_u *)" ", 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= + com! -nargs=* -complete=command SomeOne echo 'one' + com! -nargs=* -complete=command SomeTwo echo 'two' + call feedkeys("q:aSome\\\"\", 'tx') + call assert_equal('"SomeOne', @:) + call feedkeys("q:aSome\\\\"\", 'tx') + call assert_equal('"SomeTwo', @:) + call feedkeys("q:aSome\\\\\"\", '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:\\", '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 -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///