summaryrefslogtreecommitdiffstats
path: root/tty-term.c
diff options
context:
space:
mode:
authornicm <nicm>2020-10-13 07:29:24 +0000
committernicm <nicm>2020-10-13 07:29:24 +0000
commitd603dbdef007c879dfb812d569289119e61b4d3f (patch)
tree719bc8d8ee6314a3bdb0f863322db82059dba194 /tty-term.c
parent4dc76e084b9c9d3d4b04c7e29bbe425c77ee5ae8 (diff)
Set RGB flag if capabilities are present, GitHub issue 2418.
Diffstat (limited to 'tty-term.c')
-rw-r--r--tty-term.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tty-term.c b/tty-term.c
index 9161ad01..b4feea60 100644
--- a/tty-term.c
+++ b/tty-term.c
@@ -578,6 +578,9 @@ tty_term_create(struct tty *tty, char *name, int *feat, int fd, char **cause)
(!tty_term_has(term, TTYC_SETRGBF) ||
!tty_term_has(term, TTYC_SETRGBB)))
tty_add_features(feat, "RGB", ",");
+ if (tty_term_has(term, TTYC_SETRGBF) &&
+ tty_term_has(term, TTYC_SETRGBB))
+ term->flags |= TERM_RGBCOLOURS;
/* Apply the features and overrides again. */
tty_apply_features(term, *feat);