mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.1.0677: look-behind match may use the wrong line number
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)
This commit is contained in:
@@ -5582,7 +5582,7 @@ regmatch(
|
|||||||
if (has_mbyte)
|
if (has_mbyte)
|
||||||
{
|
{
|
||||||
char_u *line =
|
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 -=
|
rp->rs_un.regsave.rs_u.pos.col -=
|
||||||
(*mb_head_off)(line, line
|
(*mb_head_off)(line, line
|
||||||
|
@@ -799,6 +799,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
677,
|
||||||
/**/
|
/**/
|
||||||
676,
|
676,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user