mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
Merge pull request #7993 from blueyed/vim-8.0.1483
vim-patch:8.0.1483: searchpair() might return an invalid value on timeout
This commit is contained in:
@@ -775,12 +775,17 @@ int searchit(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ptr[matchcol] == NUL
|
if (ptr[matchcol] == NUL
|
||||||
|| (nmatched = vim_regexec_multi(®match,
|
|| (nmatched = vim_regexec_multi(
|
||||||
win, buf, lnum + matchpos.lnum,
|
®match, win, buf, lnum + matchpos.lnum, matchcol,
|
||||||
matchcol,
|
tm)) == 0) {
|
||||||
tm
|
// If the search timed out, we did find a match
|
||||||
)) == 0)
|
// but it might be the wrong one, so that's not
|
||||||
break;
|
// OK.
|
||||||
|
if (tm != NULL && profile_passed_limit(*tm)) {
|
||||||
|
match_ok = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* Need to get the line pointer again, a
|
/* Need to get the line pointer again, a
|
||||||
* multi-line search may have made it invalid. */
|
* multi-line search may have made it invalid. */
|
||||||
|
Reference in New Issue
Block a user