summaryrefslogtreecommitdiffstats
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-08-11 19:20:49 +0200
committerBram Moolenaar <Bram@vim.org>2018-08-11 19:20:49 +0200
commit21f990e1c22ffa2fdb66a548ebbe25e6e7194776 (patch)
tree04ee8dbff5de3883ad951aec692b3ada5cf2563b /src/ex_getln.c
parentef73a28401cde680dc0d02d4b0fb19ed659ec1d3 (diff)
patch 8.1.0274: 'incsearch' triggers on ":source"v8.1.0274
Problem: 'incsearch' triggers on ":source". Solution: Check for the whole command name.
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 3fb9c86233..804013bb38 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -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);