mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -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:
@@ -4338,7 +4338,7 @@ find_decl(
|
||||
for (;;)
|
||||
{
|
||||
valid = FALSE;
|
||||
t = searchit(curwin, curbuf, &curwin->w_cursor, FORWARD,
|
||||
t = searchit(curwin, curbuf, &curwin->w_cursor, NULL, FORWARD,
|
||||
pat, 1L, searchflags, RE_LAST, (linenr_T)0, NULL, NULL);
|
||||
if (curwin->w_cursor.lnum >= old_pos.lnum)
|
||||
t = FAIL; /* match after start is failure too */
|
||||
|
Reference in New Issue
Block a user