summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-06-13 17:20:08 +0200
committerBram Moolenaar <Bram@vim.org>2021-06-13 17:20:08 +0200
commite70e12b32f193addae88ae8df933b04fc234550f (patch)
tree1b2043e59736b0c12cd1e1c23d2e8ebc95ca2bb6
parent2e66b0d1373891f40e2561ccd2d3369de1614bcd (diff)
patch 8.2.2991: Vim9: no completion for :vim9 and :legacyv8.2.2991
Problem: Vim9: no completion for :vim9 and :legacy. Solution: Expand argument as a command. (closes #8377)
-rw-r--r--src/cmdexpand.c2
-rw-r--r--src/testdir/test_cmdline.vim6
-rw-r--r--src/version.c2
3 files changed, 10 insertions, 0 deletions
diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index c5b8f70585..ba31e928c0 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -1370,6 +1370,8 @@ set_one_cmd_context(
case CMD_verbose:
case CMD_vertical:
case CMD_windo:
+ case CMD_vim9cmd:
+ case CMD_legacy:
return arg;
case CMD_filter:
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index cf3362d63e..a05d010d44 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -804,6 +804,12 @@ func Test_cmdline_complete_various()
call feedkeys(":topleft new\<C-A>\<C-B>\"\<CR>", 'xt')
call assert_equal("\"topleft new", @:)
+ " completion for vim9 and legacy commands
+ call feedkeys(":vim9 call strle\<C-A>\<C-B>\"\<CR>", 'xt')
+ call assert_equal("\"vim9 call strlen(", @:)
+ call feedkeys(":legac call strle\<C-A>\<C-B>\"\<CR>", 'xt')
+ call assert_equal("\"legac call strlen(", @:)
+
" completion for the :match command
call feedkeys(":match Search /pat/\<C-A>\<C-B>\"\<CR>", 'xt')
call assert_equal("\"match Search /pat/\<C-A>", @:)
diff --git a/src/version.c b/src/version.c
index dfe1f8b1fb..07c775b41b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2991,
+/**/
2990,
/**/
2989,