mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
vim-patch:9.0.0953: part of making search more efficient is missing (#21201)
Problem: Part of making search more efficient is missing.
Solution: Add the change in searchit().
837ca8f43b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -655,7 +655,6 @@ int searchit(win_T *win, buf_T *buf, pos_T *pos, pos_T *end_pos, Direction dir,
|
||||
// match (this is vi compatible) or on the next char.
|
||||
if (dir == FORWARD && at_first_line) {
|
||||
match_ok = true;
|
||||
matchcol = col;
|
||||
|
||||
// When the match starts in a next line it's certainly
|
||||
// past the start position.
|
||||
@@ -687,8 +686,9 @@ int searchit(win_T *win, buf_T *buf, pos_T *pos, pos_T *end_pos, Direction dir,
|
||||
}
|
||||
} else {
|
||||
// Advance "matchcol" to the next character.
|
||||
// This does not use matchpos.col, because
|
||||
// "\zs" may have have set it.
|
||||
// This uses rmm_matchcol, the actual start of
|
||||
// the match, ignoring "\zs".
|
||||
matchcol = regmatch.rmm_matchcol;
|
||||
if (ptr[matchcol] != NUL) {
|
||||
matchcol += utfc_ptr2len(ptr + matchcol);
|
||||
}
|
||||
|
Reference in New Issue
Block a user