mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Make terminal true-colour mode configurable.
I know some users don't like any colour _at all_, and we have a separate option to turn off xterm-style 256-colour sequences, so it seems remiss not to have an option to disable true colour as well.
This commit is contained in:
@ -1458,6 +1458,7 @@ void term_copy_stuff_from_conf(Terminal *term)
|
||||
term->scroll_on_disp = conf_get_int(term->conf, CONF_scroll_on_disp);
|
||||
term->scroll_on_key = conf_get_int(term->conf, CONF_scroll_on_key);
|
||||
term->xterm_256_colour = conf_get_int(term->conf, CONF_xterm_256_colour);
|
||||
term->true_colour = conf_get_int(term->conf, CONF_true_colour);
|
||||
|
||||
/*
|
||||
* Parse the control-character escapes in the configured
|
||||
@ -5171,7 +5172,6 @@ static void do_paint(Terminal *term, Context ctx, int may_optimise)
|
||||
tattr = (tattr & ~(ATTR_FGMASK | ATTR_BGMASK)) |
|
||||
ATTR_DEFFG | ATTR_DEFBG;
|
||||
|
||||
tc = d->truecolour;
|
||||
if (!term->xterm_256_colour) {
|
||||
int colour;
|
||||
colour = (tattr & ATTR_FGMASK) >> ATTR_FGSHIFT;
|
||||
@ -5182,6 +5182,12 @@ static void do_paint(Terminal *term, Context ctx, int may_optimise)
|
||||
tattr = (tattr &~ ATTR_BGMASK) | ATTR_DEFBG;
|
||||
}
|
||||
|
||||
if (term->true_colour) {
|
||||
tc = d->truecolour;
|
||||
} else {
|
||||
tc.fg = tc.bg = optionalrgb_none;
|
||||
}
|
||||
|
||||
switch (tchar & CSET_MASK) {
|
||||
case CSET_ASCII:
|
||||
tchar = term->ucsdata->unitab_line[tchar & 0xFF];
|
||||
|
Reference in New Issue
Block a user