patch 8.1.0339: wrong highlight when 'incsearch' set and cancelling :s
Problem: Wrong highlight when 'incsearch' set and cancelling :s.
Solution: Reset search line range. (Hirohito Higashi, Masamichi Abe)
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 7f748cb..c316e19 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -436,12 +436,18 @@
}
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;
}
}