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 #3321)
diff --git a/src/testdir/dumps/Test_incsearch_substitute_05.dump b/src/testdir/dumps/Test_incsearch_substitute_05.dump
new file mode 100644
index 0000000..6ec8ea3
--- /dev/null
+++ b/src/testdir/dumps/Test_incsearch_substitute_05.dump
@@ -0,0 +1,9 @@
+|f+0&#ffffff0|o@1| |1| @64
+|f+1&&|o|o+0&&| |2| @64
+|f+0&#ffff4012|o|o+0&#ffffff0| |3| @64
+|f|o@1| |4| @64
+|f|o@1| |5| @64
+|f|o@1| |6| @64
+|f|o@1| |7| @64
+|f|o@1| |8| @64
+|:|2|,|3|s|u|b| @1|/|f|o> @57
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
index 38e46cc..05046b3 100644
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -868,8 +868,14 @@
call term_sendkeys(buf, ':5,2s/foo')
sleep 100m
call VerifyScreenDump(buf, 'Test_incsearch_substitute_04', {})
-
call term_sendkeys(buf, "\<Esc>")
+
+ " White space after the command is skipped
+ call term_sendkeys(buf, ':2,3sub /fo')
+ sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_05', {})
+ call term_sendkeys(buf, "\<Esc>")
+
call StopVimInTerminal(buf)
call delete('Xis_subst_script')
endfunc