mirror of
https://github.com/tmux/tmux.git
synced 2026-10-14 06:44:28 +00:00
Add a flag to mark screen_write_ctx as coming from pane input and change
a function argument.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: screen-write.c,v 1.299 2026/10/05 08:41:23 nicm Exp $ */
|
||||
/* $OpenBSD: screen-write.c,v 1.300 2026/10/12 18:47:52 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -2564,8 +2564,9 @@ screen_write_collect_insert_clear(struct screen_write_ctx *ctx, u_int px,
|
||||
* background so the columns it covered do not lose their colour.
|
||||
*/
|
||||
static void
|
||||
screen_write_clear_cell(struct grid *gd, u_int px, u_int py)
|
||||
screen_write_clear_cell(struct screen_write_ctx *ctx, u_int px, u_int py)
|
||||
{
|
||||
struct grid *gd = ctx->s->grid;
|
||||
struct grid_cell gc;
|
||||
int bg;
|
||||
|
||||
@@ -2630,7 +2631,7 @@ screen_write_collect_end(struct screen_write_ctx *ctx)
|
||||
grid_view_get_cell(s->grid, xx, s->cy, &gc);
|
||||
if (~gc.flags & GRID_FLAG_PADDING)
|
||||
break;
|
||||
screen_write_clear_cell(s->grid, xx, s->cy);
|
||||
screen_write_clear_cell(ctx, xx, s->cy);
|
||||
log_debug("%s: padding erased (before) at %u (cx %u)",
|
||||
__func__, xx, s->cx);
|
||||
}
|
||||
@@ -2639,7 +2640,7 @@ screen_write_collect_end(struct screen_write_ctx *ctx)
|
||||
grid_view_get_cell(s->grid, 0, s->cy, &gc);
|
||||
if (gc.data.width > 1 ||
|
||||
(gc.flags & GRID_FLAG_PADDING)) {
|
||||
screen_write_clear_cell(s->grid, xx, s->cy);
|
||||
screen_write_clear_cell(ctx, xx, s->cy);
|
||||
log_debug("%s: padding erased (before) at %u "
|
||||
"(cx %u)", __func__, xx, s->cx);
|
||||
}
|
||||
@@ -2658,7 +2659,7 @@ screen_write_collect_end(struct screen_write_ctx *ctx)
|
||||
grid_view_get_cell(s->grid, xx, s->cy, &gc);
|
||||
if (~gc.flags & GRID_FLAG_PADDING)
|
||||
break;
|
||||
screen_write_clear_cell(s->grid, xx, s->cy);
|
||||
screen_write_clear_cell(ctx, xx, s->cy);
|
||||
log_debug("%s: padding erased (after) at %u (cx %u)", __func__,
|
||||
xx, s->cx);
|
||||
}
|
||||
@@ -3085,12 +3086,12 @@ screen_write_overwrite(struct screen_write_ctx *ctx, struct grid_cell *gc,
|
||||
if (~tmp_gc.flags & GRID_FLAG_PADDING)
|
||||
break;
|
||||
log_debug("%s: padding at %u,%u", __func__, xx, s->cy);
|
||||
screen_write_clear_cell(gd, xx, s->cy);
|
||||
screen_write_clear_cell(ctx, xx, s->cy);
|
||||
}
|
||||
|
||||
/* Overwrite the character at the start of this padding. */
|
||||
log_debug("%s: character at %u,%u", __func__, xx, s->cy);
|
||||
screen_write_clear_cell(gd, xx, s->cy);
|
||||
screen_write_clear_cell(ctx, xx, s->cy);
|
||||
done = 1;
|
||||
}
|
||||
|
||||
@@ -3108,7 +3109,7 @@ screen_write_overwrite(struct screen_write_ctx *ctx, struct grid_cell *gc,
|
||||
break;
|
||||
log_debug("%s: overwrite at %u,%u", __func__, xx,
|
||||
s->cy);
|
||||
screen_write_clear_cell(gd, xx, s->cy);
|
||||
screen_write_clear_cell(ctx, xx, s->cy);
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user