=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty.c,v retrieving revision 1.159 retrieving revision 1.160 diff -c -r1.159 -r1.160 *** src/usr.bin/tmux/tty.c 2013/04/11 07:27:27 1.159 --- src/usr.bin/tmux/tty.c 2013/06/02 07:52:15 1.160 *************** *** 1,4 **** ! /* $OpenBSD: tty.c,v 1.159 2013/04/11 07:27:27 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tty.c,v 1.160 2013/06/02 07:52:15 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 270,280 **** tty_raw(tty, tty_term_string(tty->term, TTYC_SGR0)); tty_raw(tty, tty_term_string(tty->term, TTYC_RMKX)); tty_raw(tty, tty_term_string(tty->term, TTYC_CLEAR)); ! if (tty_term_has(tty->term, TTYC_CS1) && tty->cstyle != 0) { ! if (tty_term_has(tty->term, TTYC_CSR1)) ! tty_raw(tty, tty_term_string(tty->term, TTYC_CSR1)); else ! tty_raw(tty, tty_term_string1(tty->term, TTYC_CS1, 0)); } tty_raw(tty, tty_term_string(tty->term, TTYC_CR)); --- 270,280 ---- tty_raw(tty, tty_term_string(tty->term, TTYC_SGR0)); tty_raw(tty, tty_term_string(tty->term, TTYC_RMKX)); tty_raw(tty, tty_term_string(tty->term, TTYC_CLEAR)); ! if (tty_term_has(tty->term, TTYC_SS) && tty->cstyle != 0) { ! if (tty_term_has(tty->term, TTYC_SE)) ! tty_raw(tty, tty_term_string(tty->term, TTYC_SE)); else ! tty_raw(tty, tty_term_string1(tty->term, TTYC_SS, 0)); } tty_raw(tty, tty_term_string(tty->term, TTYC_CR)); *************** *** 455,461 **** if (*ccolour == '\0') tty_putcode(tty, TTYC_CR); else ! tty_putcode_ptr1(tty, TTYC_CC, ccolour); free(tty->ccolour); tty->ccolour = xstrdup(ccolour); } --- 455,461 ---- if (*ccolour == '\0') tty_putcode(tty, TTYC_CR); else ! tty_putcode_ptr1(tty, TTYC_CS, ccolour); free(tty->ccolour); tty->ccolour = xstrdup(ccolour); } *************** *** 479,490 **** tty_putcode(tty, TTYC_CIVIS); } if (tty->cstyle != s->cstyle) { ! if (tty_term_has(tty->term, TTYC_CS1)) { if (s->cstyle == 0 && ! tty_term_has(tty->term, TTYC_CSR1)) ! tty_putcode(tty, TTYC_CSR1); else ! tty_putcode1(tty, TTYC_CS1, s->cstyle); } tty->cstyle = s->cstyle; } --- 479,490 ---- tty_putcode(tty, TTYC_CIVIS); } if (tty->cstyle != s->cstyle) { ! if (tty_term_has(tty->term, TTYC_SS)) { if (s->cstyle == 0 && ! tty_term_has(tty->term, TTYC_SE)) ! tty_putcode(tty, TTYC_SE); else ! tty_putcode1(tty, TTYC_SS, s->cstyle); } tty->cstyle = s->cstyle; }