aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2020-05-15 16:15:24 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2020-05-15 16:15:24 +0100
commit6d92b99dbcb6a616c88df1e6abbae0a96296e7a4 (patch)
treee06f36ddb1bb6a8c9e7dc977c8e5238cd3124e94 /tty.c
parente6b17e77dbb4a757ca17d36086d7d64f097a361a (diff)
downloadrtmux-6d92b99dbcb6a616c88df1e6abbae0a96296e7a4.tar.gz
rtmux-6d92b99dbcb6a616c88df1e6abbae0a96296e7a4.tar.bz2
rtmux-6d92b99dbcb6a616c88df1e6abbae0a96296e7a4.zip
Add a terminal feature for enable/disable extended keys (supported by xterm and
mintty) and add an option to make tmux send it.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/tty.c b/tty.c
index 99996dfa..1c025b6f 100644
--- a/tty.c
+++ b/tty.c
@@ -329,10 +329,10 @@ tty_start_tty(struct tty *tty)
tty_puts(tty, "\033[?1006l\033[?1005l");
}
- if (options_get_number(global_options, "focus-events")) {
- tty->flags |= TTY_FOCUS;
+ if (options_get_number(global_options, "focus-events"))
tty_raw(tty, tty_term_string(tty->term, TTYC_ENFCS));
- }
+ if (options_get_number(global_options, "extended-keys"))
+ tty_raw(tty, tty_term_string(tty->term, TTYC_ENEKS));
if (tty->term->flags & TERM_VT100LIKE)
tty_puts(tty, "\033[?7727h");
@@ -415,12 +415,10 @@ tty_stop_tty(struct tty *tty)
tty_raw(tty, "\033[?1006l\033[?1005l");
}
- if (tty->flags & TTY_FOCUS) {
- tty->flags &= ~TTY_FOCUS;
- tty_raw(tty, tty_term_string(tty->term, TTYC_DSFCS));
- }
if (tty->term->flags & TERM_VT100LIKE)
tty_raw(tty, "\033[?7727l");
+ tty_raw(tty, tty_term_string(tty->term, TTYC_DSFCS));
+ tty_raw(tty, tty_term_string(tty->term, TTYC_DSEKS));
if (tty_use_margin(tty))
tty_raw(tty, tty_term_string(tty->term, TTYC_DSMG));