Fix up SIXEL with recent changes.

This commit is contained in:
Nicholas Marriott
2026-05-22 12:44:08 +01:00
parent d4255818c4
commit 285a3b7522
3 changed files with 13 additions and 7 deletions

14
tty.c
View File

@@ -1479,9 +1479,11 @@ tty_set_client_cb(struct tty_ctx *ttyctx, struct client *c)
if (wp->layout_cell == NULL)
return (0);
/* Set the properties relevant to the current client. */
ttyctx->bigger = tty_window_offset(&c->tty, &ttyctx->wox, &ttyctx->woy,
&ttyctx->wsx, &ttyctx->wsy);
if (tty_window_offset(&c->tty, &ttyctx->wox, &ttyctx->woy, &ttyctx->wsx,
&ttyctx->wsy))
ttyctx->flags |= TTY_CTX_WINDOW_BIGGER;
else
ttyctx->flags &= ~TTY_CTX_WINDOW_BIGGER;
ttyctx->yoff = ttyctx->ryoff = wp->yoff;
if (status_at_line(c) == 0)
@@ -1510,10 +1512,10 @@ tty_draw_images(struct client *c, struct window_pane *wp, struct screen *s)
ttyctx.sx = wp->sx;
ttyctx.sy = wp->sy;
ttyctx.ptr = im;
ttyctx.image = im;
ttyctx.arg = wp;
ttyctx.set_client_cb = tty_set_client_cb;
ttyctx.allow_invisible_panes = 1;
ttyctx.flags |= TTY_CTX_INVISIBLE_PANES;
tty_write_one(tty_cmd_sixelimage, c, &ttyctx);
}
}
@@ -2122,7 +2124,7 @@ tty_cmd_rawstring(struct tty *tty, const struct tty_ctx *ctx)
void
tty_cmd_sixelimage(struct tty *tty, const struct tty_ctx *ctx)
{
struct image *im = ctx->ptr;
struct image *im = ctx->image;
struct sixel_image *si = im->data;
struct sixel_image *new;
char *data;