refactor(plines): remove implicit curwin chartabsize() function

This commit is contained in:
Björn Linse
2021-08-10 23:18:12 +02:00
parent b506643dfc
commit ac56a27a10
6 changed files with 13 additions and 18 deletions

View File

@@ -7187,7 +7187,7 @@ static void replace_do_bs(int limit_col)
// Get the number of screen cells used by the character we are
// going to delete.
getvcol(curwin, &curwin->w_cursor, NULL, &start_vcol, NULL);
orig_vcols = chartabsize(get_cursor_pos_ptr(), start_vcol);
orig_vcols = win_chartabsize(curwin, get_cursor_pos_ptr(), start_vcol);
}
(void)del_char_after_col(limit_col);
if (l_State & VREPLACE_FLAG) {
@@ -7202,7 +7202,7 @@ static void replace_do_bs(int limit_col)
ins_len = (int)STRLEN(p) - orig_len;
vcol = start_vcol;
for (i = 0; i < ins_len; ++i) {
vcol += chartabsize(p + i, vcol);
vcol += win_chartabsize(curwin, p + i, vcol);
i += (*mb_ptr2len)(p) - 1;
}
vcol -= start_vcol;