vim-patch:8.2.0637: incsearch highlighting does not work for ":sort!"

Problem:    Incsearch highlighting does not work for ":sort!".
Solution:   Skip over the exclamation point. (closes vim/vim#5983)
333015a46e
This commit is contained in:
Jan Edmund Lazo
2020-09-14 01:30:49 -04:00
parent ea03032018
commit cc484928d5
2 changed files with 8 additions and 2 deletions

View File

@@ -339,7 +339,10 @@ static bool do_incsearch_highlighting(int firstc, incsearch_state_T *s,
p_magic = false;
}
} else if (STRNCMP(cmd, "sort", MAX(p - cmd, 3)) == 0) {
// skip over flags.
// skip over ! and flags
if (*p == '!') {
p = skipwhite(p + 1);
}
while (ASCII_ISALPHA(*(p = skipwhite(p)))) {
p++;
}