diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-11 17:45:17 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-11 17:45:18 -0400 |
commit | d6a25f89b8d664fa2a42f730e78e780fb611b0b9 (patch) | |
tree | 432d5e60b82246cc9967355330443ce3743093ec /src/nvim/regexp.c | |
parent | d624aea454e7873e3ab94db313dcacdb251490f0 (diff) | |
download | rneovim-d6a25f89b8d664fa2a42f730e78e780fb611b0b9.tar.gz rneovim-d6a25f89b8d664fa2a42f730e78e780fb611b0b9.tar.bz2 rneovim-d6a25f89b8d664fa2a42f730e78e780fb611b0b9.zip |
regexp: drop has_mbyte check in regmatch()
has_mbyte is always true in nvim.
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r-- | src/nvim/regexp.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index 9d16ecb46c..98d737c9a9 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -4921,16 +4921,13 @@ regmatch ( (colnr_T)STRLEN(regline); } } else { - if (has_mbyte) { - const char_u *const line = - reg_getline(behind_pos.rs_u.pos.lnum); + const char_u *const line = + reg_getline(behind_pos.rs_u.pos.lnum); - rp->rs_un.regsave.rs_u.pos.col -= - (*mb_head_off)(line, line - + rp->rs_un.regsave.rs_u.pos.col - 1) + 1; - } else { - rp->rs_un.regsave.rs_u.pos.col--; - } + rp->rs_un.regsave.rs_u.pos.col -= + utf_head_off(line, + line + rp->rs_un.regsave.rs_u.pos.col - 1) + + 1; } } else { if (rp->rs_un.regsave.rs_u.ptr == regline) { |