mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 16:28:17 +00:00
ex_docmd: Don't use pre-increment.
This commit is contained in:
@@ -2680,23 +2680,24 @@ set_one_cmd_context (
|
|||||||
} else {
|
} else {
|
||||||
p = cmd;
|
p = cmd;
|
||||||
while (ASCII_ISALPHA(*p) || *p == '*') { // Allow * wild card
|
while (ASCII_ISALPHA(*p) || *p == '*') { // Allow * wild card
|
||||||
++p;
|
p++;
|
||||||
}
|
}
|
||||||
// a user command may contain digits
|
// a user command may contain digits
|
||||||
if (ASCII_ISUPPER(cmd[0])) {
|
if (ASCII_ISUPPER(cmd[0])) {
|
||||||
while (ASCII_ISALNUM(*p) || *p == '*') {
|
while (ASCII_ISALNUM(*p) || *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') {
|
||||||
++p;
|
p++;
|
||||||
while (ASCII_ISALPHA(*p) || *p == '*')
|
while (ASCII_ISALPHA(*p) || *p == '*') {
|
||||||
++p;
|
p++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// check for non-alpha command
|
// check for non-alpha command
|
||||||
if (p == cmd && vim_strchr((char_u *)"@*!=><&~#", *p) != NULL) {
|
if (p == cmd && vim_strchr((char_u *)"@*!=><&~#", *p) != NULL) {
|
||||||
++p;
|
p++;
|
||||||
}
|
}
|
||||||
len = (int)(p - cmd);
|
len = (int)(p - cmd);
|
||||||
|
|
||||||
@@ -2710,9 +2711,11 @@ set_one_cmd_context (
|
|||||||
(size_t)len) == 0)
|
(size_t)len) == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (cmd[0] >= 'A' && cmd[0] <= 'Z')
|
if (cmd[0] >= 'A' && cmd[0] <= 'Z') {
|
||||||
while (ASCII_ISALNUM(*p) || *p == '*') /* Allow * wild card */
|
while (ASCII_ISALNUM(*p) || *p == '*') { // Allow * wild card
|
||||||
++p;
|
p++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user