diff options
author | Thomas Adam <thomas@xteddy.org> | 2018-02-04 12:02:24 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2018-02-04 12:02:24 +0000 |
commit | 24abfb72eb090a431de07c114836d9464f0f03c1 (patch) | |
tree | fd2fe1ced5ac6a307307642742e39be0140674d4 /tty-term.c | |
parent | 4e4c5008792069b3c8b0562a2411583e89b04aed (diff) | |
parent | fe7a871a23ada0c71fb0886ef99a356c67bf5c0d (diff) | |
download | rtmux-24abfb72eb090a431de07c114836d9464f0f03c1.tar.gz rtmux-24abfb72eb090a431de07c114836d9464f0f03c1.tar.bz2 rtmux-24abfb72eb090a431de07c114836d9464f0f03c1.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'tty-term.c')
-rw-r--r-- | tty-term.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -240,6 +240,7 @@ static const struct tty_term_code_entry tty_term_codes[] = { [TTYC_MS] = { TTYCODE_STRING, "Ms" }, [TTYC_OP] = { TTYCODE_STRING, "op" }, [TTYC_REV] = { TTYCODE_STRING, "rev" }, + [TTYC_RGB] = { TTYCODE_FLAG, "RGB" }, [TTYC_RI] = { TTYCODE_STRING, "ri" }, [TTYC_RMACS] = { TTYCODE_STRING, "rmacs" }, [TTYC_RMCUP] = { TTYCODE_STRING, "rmcup" }, @@ -531,8 +532,11 @@ tty_term_find(char *name, int fd, char **cause) code->type = TTYCODE_STRING; } - /* On terminals with RGB colour (TC), fill in setrgbf and setrgbb. */ - if (tty_term_flag(term, TTYC_TC) && + /* + * On terminals with RGB colour (Tc or RGB), fill in setrgbf and + * setrgbb if they are missing. + */ + if ((tty_term_flag(term, TTYC_TC) || tty_term_flag(term, TTYC_RGB)) && !tty_term_has(term, TTYC_SETRGBF) && !tty_term_has(term, TTYC_SETRGBB)) { code = &term->codes[TTYC_SETRGBF]; |