=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/screen-write.c,v retrieving revision 1.166 retrieving revision 1.167 diff -u -r1.166 -r1.167 --- src/usr.bin/tmux/screen-write.c 2020/04/16 21:16:24 1.166 +++ src/usr.bin/tmux/screen-write.c 2020/04/16 21:46:43 1.167 @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-write.c,v 1.166 2020/04/16 21:16:24 nicm Exp $ */ +/* $OpenBSD: screen-write.c,v 1.167 2020/04/16 21:46:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1397,17 +1397,20 @@ for (y = 0; y < screen_size_y(s); y++) { TAILQ_FOREACH_SAFE(ci, &ctx->list[y].items, entry, tmp) { screen_write_set_cursor(ctx, ci->x, y); - screen_write_initctx(ctx, &ttyctx, 0); if (ci->type == CLEAR) { + screen_write_initctx(ctx, &ttyctx, 1); ttyctx.bg = ci->bg; tty_write(tty_cmd_clearline, &ttyctx); } else if (ci->type == CLEAR_END) { + screen_write_initctx(ctx, &ttyctx, 1); ttyctx.bg = ci->bg; tty_write(tty_cmd_clearendofline, &ttyctx); } else if (ci->type == CLEAR_START) { + screen_write_initctx(ctx, &ttyctx, 1); ttyctx.bg = ci->bg; tty_write(tty_cmd_clearstartofline, &ttyctx); } else { + screen_write_initctx(ctx, &ttyctx, 0); ttyctx.cell = &ci->gc; ttyctx.wrapped = ci->wrapped; ttyctx.ptr = ci->data;