From 0c247de4ae68f9d8ed757f21487861bd0716ad30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 24 Feb 2020 18:42:04 +0100 Subject: [PATCH] sixel: CSI setters also write a reply to the client --- sixel.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sixel.c b/sixel.c index 68324fde..b538fddb 100644 --- a/sixel.c +++ b/sixel.c @@ -481,16 +481,19 @@ sixel_colors_report_current(struct terminal *term) void sixel_colors_reset(struct terminal *term) { - term->sixel.palette_size = SIXEL_MAX_COLORS; LOG_DBG("sixel palette size reset to %u", SIXEL_MAX_COLORS); + term->sixel.palette_size = SIXEL_MAX_COLORS; + sixel_colors_report_current(term); } void sixel_colors_set(struct terminal *term, unsigned count) { unsigned new_palette_size = min(max(2, count), SIXEL_MAX_COLORS); - term->sixel.palette_size = new_palette_size; LOG_DBG("sixel palette size set to %u", new_palette_size); + + term->sixel.palette_size = new_palette_size; + sixel_colors_report_current(term); } void @@ -517,18 +520,19 @@ sixel_geometry_report_current(struct terminal *term) void sixel_geometry_reset(struct terminal *term) { + LOG_DBG("sixel geometry reset to %ux%u", max_width(term), max_height(term)); term->sixel.max_width = 0; term->sixel.max_height = 0; - LOG_DBG("sixel geometry reset to %ux%u", max_width(term), max_height(term)); + sixel_geometry_report_current(term); } void sixel_geometry_set(struct terminal *term, unsigned width, unsigned height) { + LOG_DBG("sixel geometry set to %ux%u", width, height); term->sixel.max_width = width; term->sixel.max_height = height; - LOG_DBG("sixel geometry set to %ux%u", - term->sixel.max_width, term->sixel.max_height); + sixel_geometry_report_current(term); } void