Problem: Wrong highlight when 'incsearch' set and cancelling :s.
Solution: Reset search line range. (Hirohito Higashi, Masamichi Abe)
}
restore_viewstate(&is_state->old_viewstate);
highlight_match = FALSE;
+
+ // by default search all lines
+ search_first_line = 0;
+ search_last_line = MAXLNUM;
+
+ p_magic = is_state->magic_save;
+
validate_cursor(); /* needed for TAB */
if (call_update_screen)
update_screen(SOME_VALID);
else
redraw_all_later(SOME_VALID);
- p_magic = is_state->magic_save;
}
}
--- /dev/null
+|f+0&#ffff4012|o@1| +0&#ffffff0|1| @64
+>f+0&#ffff4012|o@1| +0&#ffffff0|2| @64
+|f+0&#ffff4012|o@1| +0&#ffffff0|3| @64
+|f+0&#ffff4012|o@1| +0&#ffffff0|4| @64
+|f+0&#ffff4012|o@1| +0&#ffffff0|5| @64
+|f+0&#ffff4012|o@1| +0&#ffffff0|6| @64
+|f+0&#ffff4012|o@1| +0&#ffffff0|7| @64
+|f+0&#ffff4012|o@1| +0&#ffffff0|8| @64
+@52|2|,|1| @10|T|o|p|
call VerifyScreenDump(buf, 'Test_incsearch_substitute_09', {})
call term_sendkeys(buf, "\<Esc>")
+ call term_sendkeys(buf, ":set nocursorline\<CR>")
+
+ " All matches are highlighted for 'hlsearch' after the incsearch canceled
+ call term_sendkeys(buf, "1G*")
+ call term_sendkeys(buf, ":2,5s/foo")
+ sleep 100m
+ call term_sendkeys(buf, "\<Esc>")
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_10', {})
+
call StopVimInTerminal(buf)
call delete('Xis_subst_script')
endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 339,
/**/
338,
/**/