Merge branch 'master' into expression-parser

Hoping that could fix the LSAN issue: no idea what it is talking about.
This commit is contained in:
ZyX
2017-12-03 16:19:40 +03:00
8 changed files with 104 additions and 24 deletions

View File

@@ -3484,10 +3484,17 @@ char_u *skip_range(
{
unsigned delim;
while (vim_strchr((char_u *)" \t0123456789.$%'/?-+,;", *cmd) != NULL) {
if (*cmd == '\'') {
if (*++cmd == NUL && ctx != NULL)
while (vim_strchr((char_u *)" \t0123456789.$%'/?-+,;\\", *cmd) != NULL) {
if (*cmd == '\\') {
if (cmd[1] == '?' || cmd[1] == '/' || cmd[1] == '&') {
cmd++;
} else {
break;
}
} else if (*cmd == '\'') {
if (*++cmd == NUL && ctx != NULL) {
*ctx = EXPAND_NOTHING;
}
} else if (*cmd == '/' || *cmd == '?') {
delim = *cmd++;
while (*cmd != NUL && *cmd != delim)