mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-21 05:33:45 -04:00
sixel: destroy all sixels when font size is decreased
If changing the font size causes the cell size to decrease, either horizontally or vertically (or both), then delete all sixels since the grid space they allocated no longer is enough to hold the images.
This commit is contained in:
parent
2c4ebec4da
commit
8f5e6e85e0
4 changed files with 37 additions and 1 deletions
11
sixel.c
11
sixel.c
|
|
@ -66,6 +66,17 @@ sixel_destroy(struct sixel *sixel)
|
|||
sixel->data = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
sixel_destroy_all(struct terminal *term)
|
||||
{
|
||||
tll_foreach(term->normal.sixel_images, it)
|
||||
sixel_destroy(&it->item);
|
||||
tll_foreach(term->alt.sixel_images, it)
|
||||
sixel_destroy(&it->item);
|
||||
tll_free(term->normal.sixel_images);
|
||||
tll_free(term->alt.sixel_images);
|
||||
}
|
||||
|
||||
static void
|
||||
sixel_erase(struct terminal *term, struct sixel *sixel)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue