Skip to content

Commit

Permalink
patch 8.1.0677: look-behind match may use the wrong line number
Browse files Browse the repository at this point in the history
Problem:    Look-behind match may use the wrong line number. (Dominique Pelle)
Solution:   Use the line number in regsave instead of the one in behind_pos,
            we may be looking at the previous line. (closes #3749)
  • Loading branch information
brammool committed Jan 1, 2019
1 parent 5e53ac0 commit 866f355
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/regexp.c
Expand Up @@ -5582,7 +5582,7 @@ regmatch(
if (has_mbyte)
{
char_u *line =
reg_getline(behind_pos.rs_u.pos.lnum);
reg_getline(rp->rs_un.regsave.rs_u.pos.lnum);

rp->rs_un.regsave.rs_u.pos.col -=
(*mb_head_off)(line, line
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -799,6 +799,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
677,
/**/
676,
/**/
Expand Down

0 comments on commit 866f355

Please sign in to comment.