sixel: max geometry should be max geometry, not current window size

“current geometry” will report whatever value is the smallest; the max
geometry or the current window size.

But “max geometry” always returns the configured max geometry.

This aligns foot’s behavior with XTerm.
This commit is contained in:
Daniel Eklöf 2021-03-14 10:58:13 +01:00
parent 29709c6966
commit 6eb68ffbd9
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 4 additions and 2 deletions

View file

@ -1375,8 +1375,8 @@ sixel_geometry_set(struct terminal *term, unsigned width, unsigned height)
void
sixel_geometry_report_max(struct terminal *term)
{
unsigned max_width = term->cols * term->cell_width;
unsigned max_height = term->rows * term->cell_height;
unsigned max_width = term->sixel.max_width;
unsigned max_height = term->sixel.max_height;
char reply[64];
size_t n = xsnprintf(reply, sizeof(reply), "\033[?2;0;%u;%uS", max_width, max_height);