aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-08-16 19:31:37 +0000
committerTiago Cunha <tcunha@gmx.com>2009-08-16 19:31:37 +0000
commit7182f6d799cb3b2fc06be8f4ad2f79f2d0dbd10a (patch)
tree6ac9fc106d9bfbebe06e857e8a6eefff016a0b32
parent646d6a929c81adbb978f88e14ff9b27dee0463d0 (diff)
downloadrtmux-7182f6d799cb3b2fc06be8f4ad2f79f2d0dbd10a.tar.gz
rtmux-7182f6d799cb3b2fc06be8f4ad2f79f2d0dbd10a.tar.bz2
rtmux-7182f6d799cb3b2fc06be8f4ad2f79f2d0dbd10a.zip
Sync OpenBSD patchset 262:
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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tty.c b/tty.c
index 15905c79..2047fbe1 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.127 2009-08-14 21:30:24 tcunha Exp $ */
+/* $Id: tty.c,v 1.128 2009-08-16 19:31:37 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -138,6 +138,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);
@@ -146,8 +149,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;