Patch 8.2.2669

4 views
Skip to first unread message

Bram Moolenaar

unread,
Mar 28, 2021, 9:30:24 AM3/28/21
to vim...@googlegroups.com

Patch 8.2.2669
Problem: Command line completion does not work after "vim9".
Solution: Include the "9". (Naohiro Ono, closes #8025)
Files: src/cmdexpand.c, src/ex_docmd.c, src/testdir/test_cmdline.vim


*** ../vim-8.2.2668/src/cmdexpand.c 2020-12-26 12:06:50.584655332 +0100
--- src/cmdexpand.c 2021-03-28 15:26:37.959070269 +0200
***************
*** 1020,1027 ****
p = cmd;
while (ASCII_ISALPHA(*p) || *p == '*') // Allow * wild card
++p;
! // a user command may contain digits
! if (ASCII_ISUPPER(cmd[0]))
while (ASCII_ISALNUM(*p) || *p == '*')
++p;
// for python 3.x: ":py3*" commands completion
--- 1020,1028 ----
p = cmd;
while (ASCII_ISALPHA(*p) || *p == '*') // Allow * wild card
++p;
! // A user command may contain digits.
! // Include "9" for "vim9*" commands; "vim9cmd" and "vim9script".
! if (ASCII_ISUPPER(cmd[0]) || STRNCMP("vim9", cmd, 4) == 0)
while (ASCII_ISALNUM(*p) || *p == '*')
++p;
// for python 3.x: ":py3*" commands completion
*** ../vim-8.2.2668/src/ex_docmd.c 2021-03-27 22:20:16.275228566 +0100
--- src/ex_docmd.c 2021-03-28 15:23:19.407515754 +0200
***************
*** 3553,3559 ****
}
else if (*p == '9' && STRNCMP("vim9", eap->cmd, 4) == 0)
{
! // include "9" for "vim9script"
++p;
while (ASCII_ISALPHA(*p))
++p;
--- 3553,3559 ----
}
else if (*p == '9' && STRNCMP("vim9", eap->cmd, 4) == 0)
{
! // include "9" for "vim9*" commands; "vim9cmd" and "vim9script".
++p;
while (ASCII_ISALPHA(*p))
++p;
*** ../vim-8.2.2668/src/testdir/test_cmdline.vim 2021-02-14 12:57:32.556655461 +0100
--- src/testdir/test_cmdline.vim 2021-03-28 15:23:19.407515754 +0200
***************
*** 871,876 ****
--- 871,880 ----
call feedkeys(":py3\<C-A>\<C-B>\"\<CR>", 'xt')
call assert_equal('"py3 py3do py3file', @:)

+ " completion for the :vim9 commands
+ call feedkeys(":vim9\<C-A>\<C-B>\"\<CR>", 'xt')
+ call assert_equal('"vim9cmd vim9script', @:)
+
" redir @" is not the start of a comment. So complete after that
call feedkeys(":redir @\" | cwin\t\<C-B>\"\<CR>", 'xt')
call assert_equal('"redir @" | cwindow', @:)
*** ../vim-8.2.2668/src/version.c 2021-03-27 22:20:16.275228566 +0100
--- src/version.c 2021-03-28 15:24:49.655314093 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2669,
/**/

--
If you put seven of the most talented OSS developers in a room
and ask them to fix a bug in a spreadsheet program, in one week
you'd have 2 new mail readers and a text-based web browser.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages