mirror of
https://github.com/tmux/tmux.git
synced 2026-01-11 16:30:22 +00:00
Merge branch 'obsd-master'
This commit is contained in:
@@ -61,9 +61,9 @@ screen_write_get_citem(void)
|
|||||||
|
|
||||||
ci = TAILQ_FIRST(&screen_write_citem_freelist);
|
ci = TAILQ_FIRST(&screen_write_citem_freelist);
|
||||||
if (ci != NULL) {
|
if (ci != NULL) {
|
||||||
TAILQ_REMOVE(&screen_write_citem_freelist, ci, entry);
|
TAILQ_REMOVE(&screen_write_citem_freelist, ci, entry);
|
||||||
memset(ci, 0, sizeof *ci);
|
memset(ci, 0, sizeof *ci);
|
||||||
return (ci);
|
return (ci);
|
||||||
}
|
}
|
||||||
return (xcalloc(1, sizeof *ci));
|
return (xcalloc(1, sizeof *ci));
|
||||||
}
|
}
|
||||||
@@ -71,7 +71,7 @@ screen_write_get_citem(void)
|
|||||||
static void
|
static void
|
||||||
screen_write_free_citem(struct screen_write_citem *ci)
|
screen_write_free_citem(struct screen_write_citem *ci)
|
||||||
{
|
{
|
||||||
TAILQ_INSERT_TAIL(&screen_write_citem_freelist, ci, entry);
|
TAILQ_INSERT_TAIL(&screen_write_citem_freelist, ci, entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -1899,7 +1899,7 @@ void
|
|||||||
screen_write_collect_end(struct screen_write_ctx *ctx)
|
screen_write_collect_end(struct screen_write_ctx *ctx)
|
||||||
{
|
{
|
||||||
struct screen *s = ctx->s;
|
struct screen *s = ctx->s;
|
||||||
struct screen_write_citem *ci = ctx->item, *before;
|
struct screen_write_citem *ci = ctx->item, *nci, *before;
|
||||||
struct screen_write_cline *cl = &s->write_list[s->cy];
|
struct screen_write_cline *cl = &s->write_list[s->cy];
|
||||||
struct grid_cell gc;
|
struct grid_cell gc;
|
||||||
u_int xx;
|
u_int xx;
|
||||||
@@ -1928,6 +1928,8 @@ screen_write_collect_end(struct screen_write_ctx *ctx)
|
|||||||
break;
|
break;
|
||||||
grid_view_set_cell(s->grid, xx, s->cy,
|
grid_view_set_cell(s->grid, xx, s->cy,
|
||||||
&grid_default_cell);
|
&grid_default_cell);
|
||||||
|
log_debug("%s: padding erased (before) at %u",
|
||||||
|
__func__, xx);
|
||||||
}
|
}
|
||||||
if (xx != s->cx) {
|
if (xx != s->cx) {
|
||||||
if (xx == 0)
|
if (xx == 0)
|
||||||
@@ -1935,8 +1937,19 @@ screen_write_collect_end(struct screen_write_ctx *ctx)
|
|||||||
if (gc.data.width > 1) {
|
if (gc.data.width > 1) {
|
||||||
grid_view_set_cell(s->grid, xx, s->cy,
|
grid_view_set_cell(s->grid, xx, s->cy,
|
||||||
&grid_default_cell);
|
&grid_default_cell);
|
||||||
|
log_debug("%s: padding erased (before) at %u",
|
||||||
|
__func__, xx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (xx != s->cx) {
|
||||||
|
nci = ctx->item;
|
||||||
|
nci->type = CLEAR;
|
||||||
|
nci->x = xx;
|
||||||
|
nci->bg = 8;
|
||||||
|
nci->used = s->cx - xx;
|
||||||
|
TAILQ_INSERT_BEFORE(ci, nci, entry);
|
||||||
|
ctx->item = screen_write_get_citem();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_SIXEL
|
#ifdef ENABLE_SIXEL
|
||||||
@@ -1953,6 +1966,16 @@ screen_write_collect_end(struct screen_write_ctx *ctx)
|
|||||||
if (~gc.flags & GRID_FLAG_PADDING)
|
if (~gc.flags & GRID_FLAG_PADDING)
|
||||||
break;
|
break;
|
||||||
grid_view_set_cell(s->grid, xx, s->cy, &grid_default_cell);
|
grid_view_set_cell(s->grid, xx, s->cy, &grid_default_cell);
|
||||||
|
log_debug("%s: padding erased (after) at %u", __func__, xx);
|
||||||
|
}
|
||||||
|
if (xx != s->cx) {
|
||||||
|
nci = ctx->item;
|
||||||
|
nci->type = CLEAR;
|
||||||
|
nci->x = s->cx;
|
||||||
|
nci->bg = 8;
|
||||||
|
nci->used = xx - s->cx;
|
||||||
|
TAILQ_INSERT_AFTER(&cl->items, ci, nci, entry);
|
||||||
|
ctx->item = screen_write_get_citem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2023,7 +2046,7 @@ screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc)
|
|||||||
struct tty_ctx ttyctx;
|
struct tty_ctx ttyctx;
|
||||||
u_int sx = screen_size_x(s), sy = screen_size_y(s);
|
u_int sx = screen_size_x(s), sy = screen_size_y(s);
|
||||||
u_int width = ud->width, xx, not_wrap;
|
u_int width = ud->width, xx, not_wrap;
|
||||||
int selected, skip = 1;
|
int selected, skip = 1, redraw = 0;
|
||||||
|
|
||||||
/* Ignore padding cells. */
|
/* Ignore padding cells. */
|
||||||
if (gc->flags & GRID_FLAG_PADDING)
|
if (gc->flags & GRID_FLAG_PADDING)
|
||||||
@@ -2065,8 +2088,10 @@ screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc)
|
|||||||
gl = grid_get_line(s->grid, s->grid->hsize + s->cy);
|
gl = grid_get_line(s->grid, s->grid->hsize + s->cy);
|
||||||
if (gl->flags & GRID_LINE_EXTENDED) {
|
if (gl->flags & GRID_LINE_EXTENDED) {
|
||||||
grid_view_get_cell(gd, s->cx, s->cy, &now_gc);
|
grid_view_get_cell(gd, s->cx, s->cy, &now_gc);
|
||||||
if (screen_write_overwrite(ctx, &now_gc, width))
|
if (screen_write_overwrite(ctx, &now_gc, width)) {
|
||||||
|
redraw = 1;
|
||||||
skip = 0;
|
skip = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2143,6 +2168,7 @@ screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc)
|
|||||||
ttyctx.cell = &tmp_gc;
|
ttyctx.cell = &tmp_gc;
|
||||||
} else
|
} else
|
||||||
ttyctx.cell = gc;
|
ttyctx.cell = gc;
|
||||||
|
ttyctx.num = redraw ? 2 : 0;
|
||||||
tty_write(tty_cmd_cell, &ttyctx);
|
tty_write(tty_cmd_cell, &ttyctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
6
tty.c
6
tty.c
@@ -2182,6 +2182,12 @@ tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
|
|||||||
(gcp->data.width == 1 && !tty_check_overlay(tty, px, py)))
|
(gcp->data.width == 1 && !tty_check_overlay(tty, px, py)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (ctx->num == 2) {
|
||||||
|
tty_draw_line(tty, s, 0, s->cy, screen_size_x(s),
|
||||||
|
ctx->xoff - ctx->wox, py, &ctx->defaults, ctx->palette);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Handle partially obstructed wide characters. */
|
/* Handle partially obstructed wide characters. */
|
||||||
if (gcp->data.width > 1) {
|
if (gcp->data.width > 1) {
|
||||||
tty_check_overlay_range(tty, px, py, gcp->data.width, &r);
|
tty_check_overlay_range(tty, px, py, gcp->data.width, &r);
|
||||||
|
|||||||
Reference in New Issue
Block a user