Mercurial > vim
changeset 24907:8388176a0954 v8.2.2991
patch 8.2.2991: Vim9: no completion for :vim9 and :legacy
Commit: https://github.com/vim/vim/commit/e70e12b32f193addae88ae8df933b04fc234550f
Author: Bram Moolenaar <Bram@vim.org>
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 13 Jun 2021 17:30:03 +0200 |
parents | 48ba15cbd318 |
children | f2d35a98ae9c |
files | src/cmdexpand.c src/testdir/test_cmdline.vim src/version.c |
diffstat | 3 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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:
--- 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>", @:)