diff src/ex_getln.c @ 14532:58cc47fae12e v8.1.0279

patch 8.1.0279: 'incsearch' highlighting does not skip white space commit https://github.com/vim/vim/commit/2b926fcb3c5d8bd09a219009336bbec7c66ae67e Author: Bram Moolenaar <Bram@vim.org> Date: Mon Aug 13 11:07:57 2018 +0200 patch 8.1.0279: 'incsearch' highlighting does not skip white space Problem: 'incsearch' highlighting does not skip white space. Solution: Skip white space after the command. (issue https://github.com/vim/vim/issues/3321)
author Christian Brabandt <cb@256bit.org>
date Mon, 13 Aug 2018 11:15:05 +0200
parents 60e0022e6e5d
children 8fa7f5ff2649
line wrap: on
line diff
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -293,11 +293,12 @@ do_incsearch_highlighting(int firstc, in
 		// Skip over "substitute" to find the pattern separator.
 		for (p = cmd; ASCII_ISALPHA(*p); ++p)
 		    ;
-		if (*p != NUL
+		if (*skipwhite(p) != NUL
 			&& (STRNCMP(cmd, "substitute", p - cmd) == 0
 			    || STRNCMP(cmd, "global", p - cmd) == 0
 			    || STRNCMP(cmd, "vglobal", p - cmd) == 0))
 		{
+		    p = skipwhite(p);
 		    delim = *p++;
 		    end = skip_regexp(p, delim, p_magic, NULL);
 		    if (end > p || *end == delim)