Add feature and capabilities for focus reporting. Also document AX and XT even

though they aren't tmux's.
This commit is contained in:
Nicholas Marriott
2020-04-24 07:37:11 +01:00
parent 5d69b9c4a7
commit 61550ac2e0
5 changed files with 48 additions and 11 deletions

4
tty.c
View File

@ -333,7 +333,7 @@ tty_start_tty(struct tty *tty)
if (tty_term_flag(tty->term, TTYC_XT)) {
if (options_get_number(global_options, "focus-events")) {
tty->flags |= TTY_FOCUS;
tty_puts(tty, "\033[?1004h");
tty_raw(tty, tty_term_string(tty->term, TTYC_ENFCS));
}
tty_puts(tty, "\033[?7727h");
}
@ -420,7 +420,7 @@ tty_stop_tty(struct tty *tty)
if (tty_term_flag(tty->term, TTYC_XT)) {
if (tty->flags & TTY_FOCUS) {
tty->flags &= ~TTY_FOCUS;
tty_raw(tty, "\033[?1004l");
tty_raw(tty, tty_term_string(tty->term, TTYC_DSFCS));
}
tty_raw(tty, "\033[?7727l");
}