aboutsummaryrefslogtreecommitdiff
path: root/csi.c
diff options
context:
space:
mode:
authorjvoisin <julien.voisin@dustri.org>2022-02-27 15:29:35 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-04-06 17:25:43 +0000
commit58a1ffe72483ffb52d617d2985851781e82a45b8 (patch)
tree5514c7ef7eea532a1f6d37e5a0f3af3502991308 /csi.c
parentosc: avoid unnecessary calls to strlen(3) (diff)
config: add tweak option to allow disabling sixels
Closes #950
Diffstat (limited to 'csi.c')
-rw-r--r--csi.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/csi.c b/csi.c
index af3b2216..4277677c 100644
--- a/csi.c
+++ b/csi.c
@@ -795,8 +795,13 @@ csi_dispatch(struct terminal *term, uint8_t final)
*
* Note: tertiary DA responds with "FOOT".
*/
- static const char reply[] = "\033[?62;4;22c";
- term_to_slave(term, reply, sizeof(reply) - 1);
+ if (term->conf->tweak.sixel) {
+ static const char reply[] = "\033[?62;4;22c";
+ term_to_slave(term, reply, sizeof(reply) - 1);
+ } else {
+ static const char reply[] = "\033[?62;22c";
+ term_to_slave(term, reply, sizeof(reply) - 1);
+ }
break;
}
@@ -1418,6 +1423,11 @@ csi_dispatch(struct terminal *term, uint8_t final)
break;
case 'S': {
+ if (!term->conf->tweak.sixel) {
+ UNHANDLED();
+ break;
+ }
+
unsigned target = vt_param_get(term, 0, 0);
unsigned operation = vt_param_get(term, 1, 0);