patch 8.1.0629: "gn" selects the wrong text with a multi-line match
Problem: "gn" selects the wrong text with a multi-line match.
Solution: Get the end position from searchit() directly. (closes #3695)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index d3246f4..67f505d 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -4669,7 +4669,7 @@
#ifdef FEAT_VIRTUALEDIT
pos.coladd = 0;
#endif
- if (searchit(curwin, curbuf, &pos,
+ if (searchit(curwin, curbuf, &pos, NULL,
*cmd == '?' ? BACKWARD : FORWARD,
(char_u *)"", 1L, SEARCH_MSG,
i, (linenr_T)0, NULL, NULL) != FAIL)