mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 9.0.1550: in cmdline window S-Tab does not select previous completion
Problem: In cmdline window S-Tab does not select previous completion. (Maxim Kim) Solution: Add a mappint for S-Tab. (closes #12116)
This commit is contained in:
parent
b848ce6b7e
commit
81f277f526
@ -4486,8 +4486,12 @@ open_cmdwin(void)
|
|||||||
{
|
{
|
||||||
if (p_wc == TAB)
|
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> <C-X><C-V>", MODE_INSERT, TRUE);
|
||||||
add_map((char_u *)"<buffer> <Tab> a<C-X><C-V>", MODE_NORMAL, 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",
|
set_option_value_give_err((char_u *)"ft",
|
||||||
0L, (char_u *)"vim", OPT_LOCAL);
|
0L, (char_u *)"vim", OPT_LOCAL);
|
||||||
|
@ -359,6 +359,22 @@ func Test_compl_in_cmdwin()
|
|||||||
set wildmenu& wildchar&
|
set wildmenu& wildchar&
|
||||||
endfunc
|
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()
|
func Test_cmdwin_ctrl_bsl()
|
||||||
" Using CTRL-\ CTRL-N in cmd window should close the window
|
" Using CTRL-\ CTRL-N in cmd window should close the window
|
||||||
call feedkeys("q:\<C-\>\<C-N>", 'xt')
|
call feedkeys("q:\<C-\>\<C-N>", 'xt')
|
||||||
|
@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1550,
|
||||||
/**/
|
/**/
|
||||||
1549,
|
1549,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user