diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ex_getln.c | 4 | ||||
-rw-r--r-- | src/testdir/test_cmdwin.vim | 16 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 22 insertions, 0 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index 21447ff040..595286aa34 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -4486,8 +4486,12 @@ open_cmdwin(void) { 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); diff --git a/src/testdir/test_cmdwin.vim b/src/testdir/test_cmdwin.vim index ad05f3e044..e0b5833caf 100644 --- a/src/testdir/test_cmdwin.vim +++ b/src/testdir/test_cmdwin.vim @@ -359,6 +359,22 @@ func Test_compl_in_cmdwin() 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') diff --git a/src/version.c b/src/version.c index 857a22960e..923ea9794c 100644 --- a/src/version.c +++ b/src/version.c @@ -696,6 +696,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1550, +/**/ 1549, /**/ 1548, |