1
0
forked from aniani/vim

patch 9.0.0950: the pattern "\_s\zs" matches at EOL

Problem:    The pattern "\_s\zs" matches at EOL.
Solution:   Make the pattern "\_s\zs" match at the start of the next line.
            (closes #11617)
This commit is contained in:
Bram Moolenaar
2022-11-25 21:13:47 +00:00
parent ef2c325f5e
commit c96311b5be
5 changed files with 39 additions and 10 deletions

View File

@@ -793,6 +793,8 @@ searchit(
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.
@@ -837,7 +839,9 @@ searchit(
}
else
{
matchcol = matchpos.col;
// Advance "matchcol" to the next character.
// This does not use matchpos.col, because
// "\zs" may have have set it.
if (ptr[matchcol] != NUL)
{
if (has_mbyte)