sixel: cell-size-changed: don’t verify sixels here

The state after this function is an intermediate state and isn’t
necessarily valid.

This sixels needs to be ‘reflowed’ to ensure a valid state. This is
something that should be done by the caller after the text grid has
been reflowed and the sixel coordinates have been re-mapped to the new
grid.

TODO: can/should we update the sixel cols/rows in sixel_reflow()
instead?
This commit is contained in:
Daniel Eklöf 2020-10-04 19:22:47 +02:00
parent cf620cf3d0
commit 984083bf19
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -518,7 +518,6 @@ sixel_cell_size_changed(struct terminal *term)
six->rows = (six->height + term->cell_height - 1) / term->cell_height;
six->cols = (six->width + term->cell_width - 1) / term->cell_width;
}
verify_sixels(term);
term->grid = &term->alt;
tll_foreach(term->alt.sixel_images, it) {
@ -526,7 +525,6 @@ sixel_cell_size_changed(struct terminal *term)
six->rows = (six->height + term->cell_height - 1) / term->cell_height;
six->cols = (six->width + term->cell_width - 1) / term->cell_width;
}
verify_sixels(term);
term->grid = g;
}