summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-07-10 07:11:59 +0000
committernicm <nicm@openbsd.org>2009-07-10 07:11:59 +0000
commit237a807c40ad2704680f59f2482eb69168bc964a (patch)
tree8820b708b03fcb86a0107b1f1e8edd90194b9b0e /usr.bin/tmux/tty.c
parentbillenium was in september, apparently; (diff)
downloadwireguard-openbsd-237a807c40ad2704680f59f2482eb69168bc964a.tar.xz
wireguard-openbsd-237a807c40ad2704680f59f2482eb69168bc964a.zip
Don't send initialisation strings is1/2/3 (barely anything else does) and move
smcup to the first and rmcup to the last sequences output to the terminal. This allows tmux to use the alternate screen (smcup/rmcup) when available.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r--usr.bin/tmux/tty.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index a180f89cb9e..3b448736160 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.9 2009/07/07 17:24:32 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.10 2009/07/10 07:11:59 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -157,11 +157,8 @@ tty_start_tty(struct tty *tty)
if (ioctl(tty->fd, TIOCFLUSH, &what) != 0)
fatal("ioctl(TIOCFLUSH)");
- tty_putcode(tty, TTYC_IS1);
- tty_putcode(tty, TTYC_IS2);
- tty_putcode(tty, TTYC_IS3);
-
tty_putcode(tty, TTYC_SMCUP);
+
tty_putcode(tty, TTYC_SMKX);
tty_putcode(tty, TTYC_ENACS);
tty_putcode(tty, TTYC_CLEAR);
@@ -200,12 +197,13 @@ tty_stop_tty(struct tty *tty)
tty_raw(tty, tty_term_string(tty->term, TTYC_RMACS));
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_RMCUP));
tty_raw(tty, tty_term_string(tty->term, TTYC_CLEAR));
tty_raw(tty, tty_term_string(tty->term, TTYC_CNORM));
if (tty_term_has(tty->term, TTYC_KMOUS))
tty_raw(tty, "\033[?1000l");
+
+ tty_raw(tty, tty_term_string(tty->term, TTYC_RMCUP));
}
#if 0