From: Bram Moolenaar Date: Sun, 13 Jun 2021 15:20:08 +0000 (+0200) Subject: patch 8.2.2991: Vim9: no completion for :vim9 and :legacy X-Git-Tag: v8.2.2991 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e70e12b32f193addae88ae8df933b04fc234550f;p=vim patch 8.2.2991: Vim9: no completion for :vim9 and :legacy Problem: Vim9: no completion for :vim9 and :legacy. Solution: Expand argument as a command. (closes #8377) --- diff --git a/src/cmdexpand.c b/src/cmdexpand.c index c5b8f7058..ba31e928c 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 cf3362d63..a05d010d4 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\\\"\", 'xt') call assert_equal("\"topleft new", @:) + " completion for vim9 and legacy commands + call feedkeys(":vim9 call strle\\\"\", 'xt') + call assert_equal("\"vim9 call strlen(", @:) + call feedkeys(":legac call strle\\\"\", 'xt') + call assert_equal("\"legac call strlen(", @:) + " completion for the :match command call feedkeys(":match Search /pat/\\\"\", 'xt') call assert_equal("\"match Search /pat/\", @:) diff --git a/src/version.c b/src/version.c index dfe1f8b1f..07c775b41 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2991, /**/ 2990, /**/