mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-17 05:33:52 -04:00
sixel: improve handling of images when reflowing the grids
Update the sixels' 'row' attribute when re-flowing a grid, to ensure it is rendered at the correct place. This should work in most cases, but will break when the cell size has changed (e.g. font size increase/decrease, or a DPI change). This patch also moves the sixel image list from the terminal struct into the grid struct. The sixels are per-grid after all.
This commit is contained in:
parent
62a5805d4b
commit
d482bf0a30
7 changed files with 69 additions and 42 deletions
8
csi.c
8
csi.c
|
|
@ -1143,11 +1143,9 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
|||
tll_free(term->alt.scroll_damage);
|
||||
|
||||
/* Delete all sixel images on the alt screen */
|
||||
tll_foreach(term->sixel_images, it) {
|
||||
if (it->item.grid == &term->alt) {
|
||||
sixel_destroy(&it->item);
|
||||
tll_remove(term->sixel_images, it);
|
||||
}
|
||||
tll_foreach(term->alt.sixel_images, it) {
|
||||
sixel_destroy(&it->item);
|
||||
tll_remove(term->alt.sixel_images, it);
|
||||
}
|
||||
|
||||
term_damage_all(term);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue