aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-02-24 17:42:04 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-02-24 17:42:52 +0000
commit0c247de4ae68f9d8ed757f21487861bd0716ad30 (patch)
tree742485c99fde6e9c842ac54eee02bd754e9d040e
parentterm: scroll: call sixel_delete_*() instead of manually erasing sixel images (diff)
sixel: CSI setters also write a reply to the client
-rw-r--r--sixel.c14
1 files 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