mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-08 10:06:22 -05:00
scrolling: make sure we don't clear too much memory
This commit is contained in:
parent
70743fddf4
commit
1f343527f0
1 changed files with 3 additions and 1 deletions
|
|
@ -272,7 +272,9 @@ term_scroll_partial(struct terminal *term, struct scroll_region region, int rows
|
|||
/* Clear scrolled-in lines */
|
||||
grid_memset(
|
||||
term->grid,
|
||||
max(0, region.end - rows) * term->cols, 0, rows * term->cols);
|
||||
max(0, region.end - rows) * term->cols,
|
||||
0,
|
||||
min(rows, term->rows) * term->cols);
|
||||
|
||||
term_damage_scroll(term, DAMAGE_SCROLL, region, rows);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue