mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
term: if the damage list gets too long, replace with a full redraw
This commit is contained in:
parent
d04029d703
commit
e17d297dca
1 changed files with 8 additions and 0 deletions
|
|
@ -48,10 +48,18 @@ static void
|
|||
term_damage_update_or_erase(struct terminal *term, enum damage_type damage_type,
|
||||
int start, int length)
|
||||
{
|
||||
#if 1
|
||||
if (tll_length(term->grid->damage) > 1024) {
|
||||
term_damage_all(term);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct damage dmg = {
|
||||
.type = damage_type,
|
||||
.range = {.start = term->grid->offset + start, .length = length},
|
||||
};
|
||||
|
||||
if (damage_merge_range(term, &dmg))
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue