summaryrefslogtreecommitdiffstats
path: root/tty.c
diff options
context:
space:
mode:
authornicm <nicm>2019-03-13 22:01:22 +0000
committernicm <nicm>2019-03-13 22:01:22 +0000
commit5755bfc619d9d638e82b53afc91cf06096f4dfd9 (patch)
treeb4dcf8c11362d421d4fa394edfea4d873a6512a7 /tty.c
parent10f0094be9157eba9d6dad8eace00641de960748 (diff)
Need to set attributes before clearing.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tty.c b/tty.c
index cd3ea5e0..118904a4 100644
--- a/tty.c
+++ b/tty.c
@@ -1281,12 +1281,12 @@ tty_draw_line(struct tty *tty, const struct window_pane *wp,
gcp->bg != last.bg ||
ux + width + gcp->data.width > nx ||
(sizeof buf) - len < gcp->data.size)) {
+ tty_attributes(tty, &last, wp);
if (last.flags & GRID_FLAG_CLEARED) {
log_debug("%s: %zu cleared", __func__, len);
tty_clear_line(tty, wp, aty, atx + ux, width,
last.bg);
} else {
- tty_attributes(tty, &last, wp);
tty_cursor(tty, atx + ux, aty);
tty_putn(tty, buf, len, width);
}
@@ -1322,11 +1322,11 @@ tty_draw_line(struct tty *tty, const struct window_pane *wp,
}
}
if (len != 0 && ((~last.flags & GRID_FLAG_CLEARED) || last.bg != 8)) {
+ tty_attributes(tty, &last, wp);
if (last.flags & GRID_FLAG_CLEARED) {
log_debug("%s: %zu cleared (end)", __func__, len);
tty_clear_line(tty, wp, aty, atx + ux, width, last.bg);
} else {
- tty_attributes(tty, &last, wp);
tty_cursor(tty, atx + ux, aty);
tty_putn(tty, buf, len, width);
}