mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 01:46:29 +00:00
vim-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 vim/vim#3695)
5d24a2257e
This commit is contained in:
@@ -3750,12 +3750,12 @@ static linenr_T get_address(exarg_T *eap,
|
||||
// Start the search just like for the above do_search().
|
||||
pos.col = (*cmd != '?') ? MAXCOL : 0;
|
||||
pos.coladd = 0;
|
||||
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)
|
||||
i, (linenr_T)0, NULL, NULL) != FAIL) {
|
||||
lnum = pos.lnum;
|
||||
else {
|
||||
} else {
|
||||
cmd = NULL;
|
||||
goto error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user