diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-01 22:19:08 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-01 22:19:08 +0100 |
commit | 866f3558141aa68862aa2fedbb7747bf2365e838 (patch) | |
tree | 600777ae956fddec3fce66c3b5e0b74e16c4cc20 /src/regexp.c | |
parent | 5e53ac00a2a3ead7b52ef56c61ccce823186bd2f (diff) |
patch 8.1.0677: look-behind match may use the wrong line numberv8.1.0677
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)
Diffstat (limited to 'src/regexp.c')
-rw-r--r-- | src/regexp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regexp.c b/src/regexp.c index e055dd3623..b7616416c9 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -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 |