multigrid: avoid allocation when not ext_multigrid.

Move grid specific functions from mbyte.c to screen.c
This commit is contained in:
Björn Linse
2018-08-25 13:23:54 +02:00
parent 4f1dcf7c28
commit 1a896bc93f
5 changed files with 172 additions and 140 deletions

View File

@@ -1508,7 +1508,7 @@ void edit_putchar(int c, int highlight)
if (curwin->w_p_rl) {
pc_col += curwin->w_grid.Columns - 1 - curwin->w_wcol;
if (has_mbyte) {
int fix_col = mb_fix_col(&curwin->w_grid, pc_col, pc_row);
int fix_col = grid_fix_col(&curwin->w_grid, pc_col, pc_row);
if (fix_col != pc_col) {
grid_putchar(&curwin->w_grid, ' ', pc_row, fix_col, attr);
@@ -1518,7 +1518,7 @@ void edit_putchar(int c, int highlight)
}
} else {
pc_col += curwin->w_wcol;
if (mb_lefthalve(&curwin->w_grid, pc_row, pc_col))
if (grid_lefthalve(&curwin->w_grid, pc_row, pc_col))
pc_status = PC_STATUS_LEFT;
}