mirror of
https://github.com/tmux/tmux.git
synced 2025-11-24 19:06:07 +00:00
Merge branch 'obsd-master'
This commit is contained in:
11
tty-term.c
11
tty-term.c
@@ -535,6 +535,7 @@ tty_term_create(struct tty *tty, char *name, char **caps, u_int ncaps,
|
||||
size_t offset, namelen;
|
||||
char *first;
|
||||
int n;
|
||||
struct environ_entry *envent;
|
||||
|
||||
log_debug("adding term %s", name);
|
||||
|
||||
@@ -603,6 +604,16 @@ tty_term_create(struct tty *tty, char *name, char **caps, u_int ncaps,
|
||||
(NCURSES_VERSION_MAJOR == 5 && NCURSES_VERSION_MINOR > 6)
|
||||
del_curterm(cur_term);
|
||||
#endif
|
||||
/* Check for COLORTERM. */
|
||||
envent = environ_find(tty->client->environ, "COLORTERM");
|
||||
if (envent != NULL) {
|
||||
log_debug("%s COLORTERM=%s", tty->client->name, envent->value);
|
||||
if (strcasecmp(envent->value, "truecolor") == 0 ||
|
||||
strcasecmp(envent->value, "24bit") == 0)
|
||||
tty_add_features(feat, "RGB", ",");
|
||||
else if (strstr(s, "256") != NULL)
|
||||
tty_add_features(feat, "256", ",");
|
||||
}
|
||||
|
||||
/* Apply overrides so any capabilities used for features are changed. */
|
||||
tty_term_apply_overrides(term);
|
||||
|
||||
Reference in New Issue
Block a user