To: vim_dev@googlegroups.com
Subject: Patch 7.4.895
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.4.895
Problem: Custom command line completion does not work for a command
containing digits.
Solution: Skip over the digits. (suggested by Yasuhiro Matsumoto)
Files: src/ex_docmd.c
*** ../vim-7.4.894/src/ex_docmd.c 2015-09-25 16:59:43.001963805 +0200
--- src/ex_docmd.c 2015-10-13 19:15:10.518151666 +0200
***************
*** 3517,3525 ****
p = cmd;
while (ASCII_ISALPHA(*p) || *p == '*') /* Allow * wild card */
++p;
! /* check for non-alpha command */
! if (p == cmd && vim_strchr((char_u *)"@*!=><&~#", *p) != NULL)
! ++p;
/* for python 3.x: ":py3*" commands completion */
if (cmd[0] == 'p' && cmd[1] == 'y' && p == cmd + 2 && *p == '3')
{
--- 3517,3526 ----
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 */
if (cmd[0] == 'p' && cmd[1] == 'y' && p == cmd + 2 && *p == '3')
{
***************
*** 3527,3532 ****
--- 3528,3536 ----
while (ASCII_ISALPHA(*p) || *p == '*')
++p;
}
+ /* check for non-alpha command */
+ if (p == cmd && vim_strchr((char_u *)"@*!=><&~#", *p) != NULL)
+ ++p;
len = (int)(p - cmd);
if (len == 0)
*** ../vim-7.4.894/src/version.c 2015-10-13 17:52:55.921988351 +0200
--- src/version.c 2015-10-13 19:09:26.773766612 +0200
***************
*** 743,744 ****
--- 743,746 ----
{ /* Add new patch number below this line */
+ /**/
+ 895,
/**/
--
To define recursion, we must first define recursion.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///