diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/regexp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index 9bfc158763..9d16ecb46c 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -4922,8 +4922,11 @@ regmatch ( } } else { if (has_mbyte) { + const char_u *const line = + reg_getline(behind_pos.rs_u.pos.lnum); + rp->rs_un.regsave.rs_u.pos.col -= - (*mb_head_off)(regline, regline + (*mb_head_off)(line, line + rp->rs_un.regsave.rs_u.pos.col - 1) + 1; } else { rp->rs_un.regsave.rs_u.pos.col--; |