csi: clear all existing alt damage when switch alt <--> normal

This commit is contained in:
Daniel Eklöf 2019-07-01 19:25:04 +02:00
parent ee476a7e5a
commit 7e4dd2de9a
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

6
csi.c
View file

@ -586,6 +586,9 @@ csi_dispatch(struct terminal *term, uint8_t final)
if (term->grid != &term->alt) {
term->grid = &term->alt;
term->saved_cursor = term->cursor;
tll_free(term->alt.damage);
tll_free(term->alt.scroll_damage);
term_erase(term, 0, term->rows * term->cols);
}
break;
@ -645,6 +648,9 @@ csi_dispatch(struct terminal *term, uint8_t final)
term->scroll_region.start = 0;
term->scroll_region.end = term->rows;
tll_free(term->alt.damage);
tll_free(term->alt.scroll_damage);
term_damage_all(term);
}
break;