vim-patch:8.1.0280: 'incsearch' highlighting does not work for ":g!/"

Problem:    'incsearch' highlighting does not work for ":g!/".
Solution:   Skip the exclamation mark. (Hirohito Higashi)
def7b1dc61
This commit is contained in:
Aufar Gilbran
2020-08-12 03:09:45 +08:00
parent 8ae47ddf63
commit 841ec4316c
2 changed files with 15 additions and 0 deletions

View File

@@ -299,6 +299,13 @@ static bool do_incsearch_highlighting(int firstc, incsearch_state_T *s,
&& (STRNCMP(cmd, "substitute", p - cmd) == 0
|| STRNCMP(cmd, "global", p - cmd) == 0
|| STRNCMP(cmd, "vglobal", p - cmd) == 0)) {
// Check for "global!/".
if (*cmd == 'g' && *p == '!') {
p++;
if (*skipwhite(p) == NUL) {
return false;
}
}
p = skipwhite(p);
delim = *p++;
end = skip_regexp(p, delim, p_magic, NULL);