summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2019-03-13 22:01:22 +0000
committernicm <nicm@openbsd.org>2019-03-13 22:01:22 +0000
commitc80216a3bad92c94d4315d35ac3f77093d0d5a17 (patch)
tree27b2bbd77e1ebf28beb9a7731c37ea304bbee002
parentThe pane's style should be initialized to default before parsing the (diff)
downloadwireguard-openbsd-c80216a3bad92c94d4315d35ac3f77093d0d5a17.tar.xz
wireguard-openbsd-c80216a3bad92c94d4315d35ac3f77093d0d5a17.zip
Need to set attributes before clearing.
-rw-r--r--usr.bin/tmux/tty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index c6ca94a90e0..3527dc5508e 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.315 2019/03/12 23:21:45 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.316 2019/03/13 22:01:22 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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);
}