Mercurial > vim
diff src/proto/search.pro @ 15239:db5d2429bda3 v8.1.0629
patch 8.1.0629: "gn" selects the wrong text with a multi-line match
commit https://github.com/vim/vim/commit/5d24a2257e597fd752e33b2c1e9c19cf9114a517
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 23 19:10:09 2018 +0100
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 https://github.com/vim/vim/issues/3695)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 23 Dec 2018 19:15:05 +0100 |
parents | 1174611ad715 |
children | d4b2a212fa2f |
line wrap: on
line diff
--- a/src/proto/search.pro +++ b/src/proto/search.pro @@ -22,7 +22,7 @@ char_u *last_search_pat(void); void reset_search_dir(void); void set_last_search_pat(char_u *s, int idx, int magic, int setlast); void last_pat_prog(regmmatch_T *regmatch); -int searchit(win_T *win, buf_T *buf, pos_T *pos, int dir, char_u *pat, long count, int options, int pat_use, linenr_T stop_lnum, proftime_T *tm, int *timed_out); +int searchit(win_T *win, buf_T *buf, pos_T *pos, pos_T *end_pos, int dir, char_u *pat, long count, int options, int pat_use, linenr_T stop_lnum, proftime_T *tm, int *timed_out); void set_search_direction(int cdir); int do_search(oparg_T *oap, int dirc, char_u *pat, long count, int options, proftime_T *tm, int *timed_out); int search_for_exact_line(buf_T *buf, pos_T *pos, int dir, char_u *pat);