comparison src/ex_getln.c @ 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 9df130fd5e0d
children 55ccc2d353bd
comparison
equal deleted inserted replaced
15238:85705008bb7a 15239:db5d2429bda3
673 if (!p_hls) 673 if (!p_hls)
674 search_flags += SEARCH_KEEP; 674 search_flags += SEARCH_KEEP;
675 ++emsg_off; 675 ++emsg_off;
676 save = pat[patlen]; 676 save = pat[patlen];
677 pat[patlen] = NUL; 677 pat[patlen] = NUL;
678 i = searchit(curwin, curbuf, &t, 678 i = searchit(curwin, curbuf, &t, NULL,
679 c == Ctrl_G ? FORWARD : BACKWARD, 679 c == Ctrl_G ? FORWARD : BACKWARD,
680 pat, count, search_flags, 680 pat, count, search_flags,
681 RE_SEARCH, 0, NULL, NULL); 681 RE_SEARCH, 0, NULL, NULL);
682 --emsg_off; 682 --emsg_off;
683 pat[patlen] = save; 683 pat[patlen] = save;