Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2025-11-03 09:57:35 +00:00
10 changed files with 152 additions and 74 deletions

View File

@@ -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);