0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.1.0274: 'incsearch' triggers on ":source"

Problem:    'incsearch' triggers on ":source".
Solution:   Check for the whole command name.
This commit is contained in:
Bram Moolenaar
2018-08-11 19:20:49 +02:00
parent ef73a28401
commit 21f990e1c2
3 changed files with 33 additions and 22 deletions

View File

@@ -293,7 +293,10 @@ do_incsearch_highlighting(int firstc, incsearch_state_T *is_state,
// Skip over "substitute" to find the pattern separator.
for (p = cmd; ASCII_ISALPHA(*p); ++p)
;
if (*p != NUL)
if (*p != NUL
&& (STRNCMP(cmd, "substitute", p - cmd) == 0
|| STRNCMP(cmd, "global", p - cmd) == 0
|| STRNCMP(cmd, "vglobal", p - cmd) == 0))
{
delim = *p++;
end = skip_regexp(p, delim, p_magic, NULL);