mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
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)
This commit is contained in:
parent
f59c73da1e
commit
23d1b62746
@ -3517,9 +3517,10 @@ set_one_cmd_context(xp, buff)
|
|||||||
p = cmd;
|
p = cmd;
|
||||||
while (ASCII_ISALPHA(*p) || *p == '*') /* Allow * wild card */
|
while (ASCII_ISALPHA(*p) || *p == '*') /* Allow * wild card */
|
||||||
++p;
|
++p;
|
||||||
/* check for non-alpha command */
|
/* a user command may contain digits */
|
||||||
if (p == cmd && vim_strchr((char_u *)"@*!=><&~#", *p) != NULL)
|
if (ASCII_ISUPPER(cmd[0]))
|
||||||
++p;
|
while (ASCII_ISALNUM(*p) || *p == '*')
|
||||||
|
++p;
|
||||||
/* for python 3.x: ":py3*" commands completion */
|
/* for python 3.x: ":py3*" commands completion */
|
||||||
if (cmd[0] == 'p' && cmd[1] == 'y' && p == cmd + 2 && *p == '3')
|
if (cmd[0] == 'p' && cmd[1] == 'y' && p == cmd + 2 && *p == '3')
|
||||||
{
|
{
|
||||||
@ -3527,6 +3528,9 @@ set_one_cmd_context(xp, buff)
|
|||||||
while (ASCII_ISALPHA(*p) || *p == '*')
|
while (ASCII_ISALPHA(*p) || *p == '*')
|
||||||
++p;
|
++p;
|
||||||
}
|
}
|
||||||
|
/* check for non-alpha command */
|
||||||
|
if (p == cmd && vim_strchr((char_u *)"@*!=><&~#", *p) != NULL)
|
||||||
|
++p;
|
||||||
len = (int)(p - cmd);
|
len = (int)(p - cmd);
|
||||||
|
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
|
@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
895,
|
||||||
/**/
|
/**/
|
||||||
894,
|
894,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user