0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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)
This commit is contained in:
Bram Moolenaar
2018-12-23 19:10:09 +01:00
parent c33181c44c
commit 5d24a2257e
9 changed files with 60 additions and 54 deletions

View File

@@ -4653,7 +4653,7 @@ ins_compl_get_exp(pos_T *ini)
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);