mirror of
https://github.com/tmux/tmux.git
synced 2026-10-10 20:24:21 +00:00
Fix Kitty image deletion, placeholders and placement geometry.
This commit is contained in:
18
tty.c
18
tty.c
@@ -1935,6 +1935,22 @@ tty_cmd_alignmenttest(struct tty *tty, const struct tty_ctx *ctx)
|
||||
void
|
||||
tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
|
||||
{
|
||||
const struct grid_cell *cell = ctx->cell;
|
||||
#ifdef ENABLE_IMAGES
|
||||
struct grid_cell placeholder_cell;
|
||||
struct kitty_placeholder placeholder;
|
||||
|
||||
if (kitty_cell_is_placeholder(cell)) {
|
||||
if (image_grid_get_placeholder(ctx->s->grid, ctx->ocx,
|
||||
ctx->s->grid->hsize + ctx->ocy, &placeholder)) {
|
||||
memcpy(&placeholder_cell, cell,
|
||||
sizeof placeholder_cell);
|
||||
utf8_set(&placeholder_cell.data, ' ');
|
||||
cell = &placeholder_cell;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!tty_is_visible(tty, ctx, ctx->ocx, ctx->ocy, 1, 1))
|
||||
return;
|
||||
|
||||
@@ -1948,7 +1964,7 @@ tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
|
||||
tty_invalidate(tty);
|
||||
tty_cursor_pane_unless_wrap(tty, ctx, ctx->ocx, ctx->ocy);
|
||||
|
||||
tty_cell(tty, ctx->cell, &ctx->style_ctx);
|
||||
tty_cell(tty, cell, &ctx->style_ctx);
|
||||
|
||||
if (ctx->flags & TTY_CTX_CELL_INVALIDATE)
|
||||
tty_invalidate(tty);
|
||||
|
||||
Reference in New Issue
Block a user