aboutsummaryrefslogtreecommitdiff
path: root/tty-term.c
diff options
context:
space:
mode:
authornicm <nicm>2020-04-16 13:35:24 +0000
committernicm <nicm>2020-04-16 13:35:24 +0000
commitb2443aa2f98c1a1fa5d53d4e79a3e7fd221cc365 (patch)
tree3cc90dfb69ef9c9c6c340639196da2815e9cf4de /tty-term.c
parenta2e47b527986af6140a9dfa43c9448347dc0a050 (diff)
downloadrtmux-b2443aa2f98c1a1fa5d53d4e79a3e7fd221cc365.tar.gz
rtmux-b2443aa2f98c1a1fa5d53d4e79a3e7fd221cc365.tar.bz2
rtmux-b2443aa2f98c1a1fa5d53d4e79a3e7fd221cc365.zip
Add support for the iTerm2 sychronized updates escape sequence which
drastically reduces flickering.
Diffstat (limited to 'tty-term.c')
-rw-r--r--tty-term.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tty-term.c b/tty-term.c
index ef7d7905..d6faa6ff 100644
--- a/tty-term.c
+++ b/tty-term.c
@@ -260,6 +260,7 @@ static const struct tty_term_code_entry tty_term_codes[] = {
[TTYC_SMUL] = { TTYCODE_STRING, "smul" },
[TTYC_SMXX] = { TTYCODE_STRING, "smxx" },
[TTYC_SS] = { TTYCODE_STRING, "Ss" },
+ [TTYC_SYNC] = { TTYCODE_FLAG, "Sync" },
[TTYC_TC] = { TTYCODE_FLAG, "Tc" },
[TTYC_TSL] = { TTYCODE_STRING, "tsl" },
[TTYC_U8] = { TTYCODE_NUMBER, "U8" },
@@ -532,6 +533,10 @@ tty_term_find(char *name, int fd, char **cause)
tty_term_has(term, TTYC_SETRGBB)))
term->flags |= TERM_RGBCOLOURS;
+ /* Set flag if terminal has synchronized updates. */
+ if (tty_term_flag(term, TTYC_SYNC))
+ term->flags |= TERM_SYNC;
+
/*
* Terminals without xenl (eat newline glitch) wrap at at $COLUMNS - 1
* rather than $COLUMNS (the cursor can never be beyond $COLUMNS - 1).