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/edit.c b/src/edit.c
index c6b0619..a522fe9 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -4653,7 +4653,7 @@
found_new_match = search_for_exact_line(ins_buf, pos,
compl_direction, compl_pattern);
else
- found_new_match = searchit(NULL, ins_buf, pos,
+ found_new_match = searchit(NULL, ins_buf, pos, NULL,
compl_direction,
compl_pattern, 1L, SEARCH_KEEP + SEARCH_NFMSG,
RE_LAST, (linenr_T)0, NULL, NULL);