diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-01-05 22:41:43 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-01-05 22:43:46 -0500 |
commit | 772f4ce9f8de11aa3e1cb26e00fd3f3ac3b062bf (patch) | |
tree | 36843352cf18d4f34460d3d50586523e53fbec1b /src/nvim/regexp.c | |
parent | 38b4ca26b555e5bdca4d672917a85f1bd60297c2 (diff) | |
download | rneovim-772f4ce9f8de11aa3e1cb26e00fd3f3ac3b062bf.tar.gz rneovim-772f4ce9f8de11aa3e1cb26e00fd3f3ac3b062bf.tar.bz2 rneovim-772f4ce9f8de11aa3e1cb26e00fd3f3ac3b062bf.zip |
vim-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 vim/vim#3749)
https://github.com/vim/vim/commit/866f3558141aa68862aa2fedbb7747bf2365e838
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r-- | src/nvim/regexp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index d62a009fbc..0b9e1cfdec 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -4920,7 +4920,7 @@ regmatch ( } } else { const char_u *const 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 -= utf_head_off(line, |