Pass through SIXEL DCS sequences (treat similarly to the passthrough escape

sequence) if it appears the terminal outside supports them.
This commit is contained in:
Nicholas Marriott
2019-11-28 12:35:18 +00:00
parent e00730d149
commit b34111b3da
7 changed files with 57 additions and 10 deletions

15
tty.c
View File

@@ -436,9 +436,10 @@ tty_free(struct tty *tty)
}
void
tty_set_type(struct tty *tty, int type)
tty_set_type(struct tty *tty, int type, int flags)
{
tty->term_type = type;
tty->term_flags |= flags;
if (tty_use_margin(tty))
tty_puts(tty, "\033[?69h"); /* DECLRMM */
@@ -1865,6 +1866,18 @@ tty_cmd_rawstring(struct tty *tty, const struct tty_ctx *ctx)
tty_invalidate(tty);
}
void
tty_cmd_rawsixel(struct tty *tty, const struct tty_ctx *ctx)
{
int flags = (tty->term->flags|tty->term_flags);
if ((flags & TERM_SIXEL) || tty_term_has(tty->term, TTYC_SXL)) {
tty_add(tty, ctx->ptr, ctx->num);
if (!ctx->more)
tty_invalidate(tty);
}
}
static void
tty_cell(struct tty *tty, const struct grid_cell *gc, struct window_pane *wp)
{