diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-06-27 13:22:31 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-06-27 13:22:31 +0000 |
| commit | ae727e372abfb5cd516f1fbab0fff28499f7d02b (patch) | |
| tree | 7a829a00b5dfbcc718a6b33e3ebbf50f0f58e586 /terminal.c | |
| parent | sixel: delete/split: early(ier) exit when there aren't in sixel images (diff) | |
term: erasing characters now splits sixels instead of deleting them
Diffstat (limited to 'terminal.c')
| -rw-r--r-- | terminal.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -1599,9 +1599,7 @@ term_erase(struct terminal *term, const struct coord *start, const struct coord if (start->row == end->row) { struct row *row = grid_row(term->grid, start->row); erase_cell_range(term, row, start->col, end->col); - - /* TODO: split instead */ - sixel_delete_at_row(term, start->row); + sixel_split_by_row(term, start->row, start->col, end->col - start->col + 1); return; } @@ -1609,14 +1607,14 @@ term_erase(struct terminal *term, const struct coord *start, const struct coord erase_cell_range( term, grid_row(term->grid, start->row), start->col, term->cols - 1); + sixel_split_by_row(term, start->row, start->col, term->cols - start->col); for (int r = start->row + 1; r < end->row; r++) erase_line(term, grid_row(term->grid, r)); + sixel_split_by_rectangle(term, start->row + 1, 0, end->row - start->row, term->cols); erase_cell_range(term, grid_row(term->grid, end->row), 0, end->col); - - /* TODO: split instead */ - sixel_delete_in_range(term, start->row, end->row); + sixel_split_by_row(term, end->row, 0, end->col + 1); } int |
