sixel: decgra: set max-non-empty-row-no when resizing the image

This ensures we don’t trim off bottom rows in unhook().

This could happen either because the application used “Set Raster
Attributes” to configure an image size larger than the sixels later
emitted.

Or, the last sixel row contains empty pixel rows.

In either case, the size set with “Set Raster Attributes” defines
the *minimum* image size; the image may still end up being larger.
This commit is contained in:
Daniel Eklöf 2021-03-10 20:31:21 +01:00
parent a8186351d1
commit 6f6bcbc1bc
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -1145,6 +1145,7 @@ decgra(struct terminal *term, uint8_t c)
ph <= term->sixel.max_height && pv <= term->sixel.max_width)
{
resize(term, ph, pv);
term->sixel.max_non_empty_row_no = pv - 1;
}
term->sixel.state = SIXEL_DECSIXEL;