patch 8.0.0692: CTRL-G with 'incsearch' and ? goes in the wrong direction
Problem: Using CTRL-G with 'incsearch' and ? goes in the wrong direction.
(Ramel Eshed)
Solution: Adjust search_start. (Christian Brabandt)
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 11de136..a888ba4 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1708,6 +1708,14 @@
search_start = t;
(void)decl(&search_start);
}
+ else if (c == Ctrl_G && firstc == '?')
+ {
+ /* move just after the current match, so that
+ * when nv_search finishes the cursor will be
+ * put back on the match */
+ search_start = t;
+ (void)incl(&search_start);
+ }
if (LT_POS(t, search_start) && c == Ctrl_G)
{
/* wrap around */