diff options
author | nicm <nicm> | 2020-01-28 11:39:51 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-01-28 11:39:51 +0000 |
commit | a6129e99749d2bbc8b4a991c7b5d09300aa55f39 (patch) | |
tree | fcfccf41c309a9db3a8b3af30bc629bdb9169f4c /tty-keys.c | |
parent | 84995ae1726589b5fb04e002e43496775e0ebfcd (diff) | |
download | rtmux-a6129e99749d2bbc8b4a991c7b5d09300aa55f39.tar.gz rtmux-a6129e99749d2bbc8b4a991c7b5d09300aa55f39.tar.bz2 rtmux-a6129e99749d2bbc8b4a991c7b5d09300aa55f39.zip |
If we can identify the terminal as iTerm2 or as tmux, we can be sure
they support 256 and RGB colours, so set those flags too.
Diffstat (limited to 'tty-keys.c')
-rw-r--r-- | tty-keys.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1117,7 +1117,9 @@ tty_keys_device_status_report(struct tty *tty, const char *buf, size_t len, /* Set terminal flags. */ if (strncmp(tmp, "ITERM2 ", 7) == 0) - flags |= TERM_DECSLRM; + flags |= (TERM_DECSLRM|TERM_256COLOURS|TERM_RGBCOLOURS); + if (strncmp(tmp, "TMUX ", 5) == 0) + flags |= (TERM_256COLOURS|TERM_RGBCOLOURS); log_debug("%s: received DSR %.*s", c->name, (int)*size, buf); tty_set_flags(tty, flags); |