mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-17 22:05:22 -05:00
grid: reflow: delete sixels that end up crossing the scrollback wrap around
Our sixel handling code requires sixels to *not* cross the scrollback wrap around. Until we've fixes the reflow code that split up such sixels (much like we do when we generate a sixel), simply delete it.
This commit is contained in:
parent
ad8f293d96
commit
deb61d20d8
1 changed files with 6 additions and 5 deletions
11
grid.c
11
grid.c
|
|
@ -123,11 +123,12 @@ grid_reflow(struct grid *grid, int new_rows, int new_cols,
|
|||
struct sixel six = it->item;
|
||||
six.pos.row = new_row_idx;
|
||||
|
||||
/* TODO: ensure sixels don't span across the wrap-around */
|
||||
int end __attribute__((unused)) = (six.pos.row + six.rows - 1) & (new_rows - 1);
|
||||
assert(end >= six.pos.row);
|
||||
|
||||
tll_push_back(new_sixels, six);
|
||||
int end = (six.pos.row + six.rows - 1) & (new_rows - 1);
|
||||
if (end < six.pos.row) {
|
||||
/* TODO: split sixel instead of removing it... */
|
||||
sixel_destroy(&it->item);
|
||||
} else
|
||||
tll_push_back(new_sixels, six);
|
||||
tll_remove(grid->sixel_images, it);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue