regexp: drop has_mbyte check in regmatch()

has_mbyte is always true in nvim.
This commit is contained in:
Jan Edmund Lazo 2018-08-11 17:45:17 -04:00
parent d624aea454
commit d6a25f89b8

View File

@ -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) {