# HG changeset patch # User Bram Moolenaar # Date 1623598203 -7200 # Node ID 8388176a09541a12dccd42652a6fa0761592e1d3 # Parent 48ba15cbd3180900c9939727ae2a880a714a203a patch 8.2.2991: Vim9: no completion for :vim9 and :legacy Commit: https://github.com/vim/vim/commit/e70e12b32f193addae88ae8df933b04fc234550f Author: Bram Moolenaar Date: Sun Jun 13 17:20:08 2021 +0200 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 https://github.com/vim/vim/issues/8377) diff --git a/src/cmdexpand.c b/src/cmdexpand.c --- 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 --- 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 --- 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,