diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-02-07 22:43:38 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-02-07 22:43:38 +0100 |
commit | f1843c0035769637daab88aa476753ce54d41387 (patch) | |
tree | 30611c1f3f979cbc05dde7722e30bbec80bb8550 /src | |
parent | 12044218887264a885fdf4c7469e68d980c5d738 (diff) | |
download | rneovim-f1843c0035769637daab88aa476753ce54d41387.tar.gz rneovim-f1843c0035769637daab88aa476753ce54d41387.tar.bz2 rneovim-f1843c0035769637daab88aa476753ce54d41387.zip |
vim-patch:8.1.0677: look-behind match may use the wrong line number
crash reported in #9584
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')
-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, |