Do not need to set up a tty context for clearing lines now.

This commit is contained in:
nicm 2020-04-16 21:16:24 +00:00
parent d90ca7ecd6
commit d8433add47

View File

@ -957,7 +957,6 @@ screen_write_clearendofline(struct screen_write_ctx *ctx, u_int bg)
{
struct screen *s = ctx->s;
struct grid_line *gl;
struct tty_ctx ttyctx;
u_int sx = screen_size_x(s);
struct screen_write_collect_item *ci = ctx->item;
@ -970,9 +969,6 @@ screen_write_clearendofline(struct screen_write_ctx *ctx, u_int bg)
if (s->cx > sx - 1 || (s->cx >= gl->cellsize && COLOUR_DEFAULT(bg)))
return;
screen_write_initctx(ctx, &ttyctx, 1);
ttyctx.bg = bg;
grid_view_clear(s->grid, s->cx, s->cy, sx - s->cx, 1, bg);
if (!screen_write_collect_clear_end(ctx, s->cy, s->cx, bg)) {
@ -989,7 +985,6 @@ void
screen_write_clearstartofline(struct screen_write_ctx *ctx, u_int bg)
{
struct screen *s = ctx->s;
struct tty_ctx ttyctx;
u_int sx = screen_size_x(s);
struct screen_write_collect_item *ci = ctx->item;
@ -998,9 +993,6 @@ screen_write_clearstartofline(struct screen_write_ctx *ctx, u_int bg)
return;
}
screen_write_initctx(ctx, &ttyctx, 1);
ttyctx.bg = bg;
if (s->cx > sx - 1)
grid_view_clear(s->grid, 0, s->cy, sx, 1, bg);
else