mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 16:28:17 +00:00
vim-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)
23d1b62746
This commit is contained in:
@@ -2679,17 +2679,25 @@ set_one_cmd_context (
|
|||||||
p = cmd + 1;
|
p = cmd + 1;
|
||||||
} else {
|
} else {
|
||||||
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 */
|
}
|
||||||
if (p == cmd && vim_strchr((char_u *)"@*!=><&~#", *p) != NULL)
|
// a user command may contain digits
|
||||||
++p;
|
if (ASCII_ISUPPER(cmd[0])) {
|
||||||
/* for python 3.x: ":py3*" commands completion */
|
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') {
|
if (cmd[0] == 'p' && cmd[1] == 'y' && p == cmd + 2 && *p == '3') {
|
||||||
++p;
|
++p;
|
||||||
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) {
|
||||||
|
@@ -393,7 +393,7 @@ static int included_patches[] = {
|
|||||||
898,
|
898,
|
||||||
// 897 NA
|
// 897 NA
|
||||||
// 896,
|
// 896,
|
||||||
// 895,
|
895,
|
||||||
// 894 NA
|
// 894 NA
|
||||||
// 893,
|
// 893,
|
||||||
// 892,
|
// 892,
|
||||||
|
Reference in New Issue
Block a user