summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2013-03-22 10:30:04 +0000
committernicm <nicm@openbsd.org>2013-03-22 10:30:04 +0000
commit44f5e99db15d40d29af609a6f6716a93afe17ac4 (patch)
tree7ed6859638894a187838f33d2023e19fcfcd29c7 /usr.bin/tmux/tty.c
parentI strongly suspect it is possible for tmux to block on detach in (diff)
downloadwireguard-openbsd-44f5e99db15d40d29af609a6f6716a93afe17ac4.tar.xz
wireguard-openbsd-44f5e99db15d40d29af609a6f6716a93afe17ac4.zip
In terminals with XT, turn on modifyOtherKeys=1 with the escape sequence
and handle the most common set. Pass them through if xterm-keys is on.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r--usr.bin/tmux/tty.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index 2390bfaf11e..6c8eb3ddc0e 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.150 2013/03/22 10:29:31 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.151 2013/03/22 10:30:04 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -223,7 +223,7 @@ tty_start_tty(struct tty *tty)
tty_puts(tty, "\033[?1000l");
if (tty_term_has(tty->term, TTYC_XT))
- tty_puts(tty, "\033[c");
+ tty_puts(tty, "\033[c\033[>4;1m");
tty->cx = UINT_MAX;
tty->cy = UINT_MAX;
@@ -285,6 +285,9 @@ tty_stop_tty(struct tty *tty)
if (tty_term_has(tty->term, TTYC_KMOUS))
tty_raw(tty, "\033[?1000l");
+ if (tty_term_has(tty->term, TTYC_XT))
+ tty_puts(tty, "\033[>4m");
+
tty_raw(tty, tty_term_string(tty->term, TTYC_RMCUP));
setblocking(tty->fd, 1);