aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-08-14 08:53:52 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-08-14 08:53:52 +0000
commit5cf994856ffcbd95b1821e687dc271c6f81b6e35 (patch)
treefe999d39c429b561f2ae785b7182cbfb0c4fd2fa
parent09cbd0c695cdd953834a46d161f6d3b0bf385c1c (diff)
downloadrtmux-5cf994856ffcbd95b1821e687dc271c6f81b6e35.tar.gz
rtmux-5cf994856ffcbd95b1821e687dc271c6f81b6e35.tar.bz2
rtmux-5cf994856ffcbd95b1821e687dc271c6f81b6e35.zip
Send SGR0 when initialising the screen. Fixes problems on terminals with BCE
(like putty) if the background colours is non-default when tmux starts. May also fix problems when resuming a suspended tmux.
-rw-r--r--tty.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tty.c b/tty.c
index 1c985dcc..0428a0cc 100644
--- a/tty.c
+++ b/tty.c
@@ -134,6 +134,9 @@ tty_start_tty(struct tty *tty)
tty_putcode(tty, TTYC_SMCUP);
+ tty_putcode(tty, TTYC_SGR0);
+ memcpy(&tty->cell, &grid_default_cell, sizeof tty->cell);
+
tty_putcode(tty, TTYC_SMKX);
tty_putcode(tty, TTYC_ENACS);
tty_putcode(tty, TTYC_CLEAR);
@@ -142,8 +145,6 @@ tty_start_tty(struct tty *tty)
if (tty_term_has(tty->term, TTYC_KMOUS))
tty_puts(tty, "\033[?1000l");
- memcpy(&tty->cell, &grid_default_cell, sizeof tty->cell);
-
tty->cx = UINT_MAX;
tty->cy = UINT_MAX;