aboutsummaryrefslogtreecommitdiff
path: root/sixel.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-03-14 09:58:13 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-03-14 09:58:13 +0000
commit6eb68ffbd99cc48aa688e59a230b4fca98fe0cb5 (patch)
treea96cd3fca8c375474662cadaa461b22d4e41cd1c /sixel.c
parentscripts: generate-alt-random: reduce number of emitted sixels (diff)
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.
Diffstat (limited to 'sixel.c')
-rw-r--r--sixel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sixel.c b/sixel.c
index 20f15cab..96ba9214 100644
--- a/sixel.c
+++ b/sixel.c
@@ -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);