mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-06 04:06:06 -05:00
term: scrolling: sixel: simplify now that row count is clamped
This commit is contained in:
parent
cfd0b5d2d8
commit
8f9e6127da
1 changed files with 2 additions and 2 deletions
|
|
@ -1753,7 +1753,7 @@ term_scroll_partial(struct terminal *term, struct scroll_region region, int rows
|
|||
for (int r = region.end - rows; r < region.end; r++)
|
||||
erase_line(term, grid_row_and_alloc(term->grid, r));
|
||||
|
||||
sixel_delete_in_range(term, max(region.end - rows, region.start), region.end - 1);
|
||||
sixel_delete_in_range(term, region.end - rows, region.end - 1);
|
||||
term_damage_scroll(term, DAMAGE_SCROLL, region, rows);
|
||||
term->grid->cur_row = grid_row(term->grid, term->grid->cursor.point.row);
|
||||
|
||||
|
|
@ -1807,7 +1807,7 @@ term_scroll_reverse_partial(struct terminal *term,
|
|||
for (int r = region.start; r < region.start + rows; r++)
|
||||
erase_line(term, grid_row_and_alloc(term->grid, r));
|
||||
|
||||
sixel_delete_in_range(term, region.start, min(region.start + rows, region.end) - 1);
|
||||
sixel_delete_in_range(term, region.start, region.start + rows - 1);
|
||||
term_damage_scroll(term, DAMAGE_SCROLL_REVERSE, region, rows);
|
||||
term->grid->cur_row = grid_row(term->grid, term->grid->cursor.point.row);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue