mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 11:02:48 -05:00
xterm apparently supports ESC[90m through ESC[97m to set bright
foreground colours, and ESC[100m through ESC[107m to set bright background colours. Hence, so do we. Bright-foreground is distinguishable from bold, and bright-background distinguishable from blink, when it leaves terminal.c; the front end may then choose to display them in the same way if it's configured to do so. This change makes the xterm backend for Turbo Vision (!!!) work properly. Untested on Mac. [originally from svn r2734]
This commit is contained in:
10
unix/pterm.c
10
unix/pterm.c
@ -1542,17 +1542,19 @@ void do_text_internal(Context ctx, int x, int y, char *text, int len,
|
||||
|
||||
int nfg, nbg, t, fontid, shadow, rlen, widefactor;
|
||||
|
||||
nfg = 2 * ((attr & ATTR_FGMASK) >> ATTR_FGSHIFT);
|
||||
nbg = 2 * ((attr & ATTR_BGMASK) >> ATTR_BGSHIFT);
|
||||
nfg = ((attr & ATTR_FGMASK) >> ATTR_FGSHIFT);
|
||||
nfg = 2 * (nfg & 0xF) + (nfg & 0x10 ? 1 : 0);
|
||||
nbg = ((attr & ATTR_BGMASK) >> ATTR_BGSHIFT);
|
||||
nbg = 2 * (nbg & 0xF) + (nbg & 0x10 ? 1 : 0);
|
||||
if (attr & ATTR_REVERSE) {
|
||||
t = nfg;
|
||||
nfg = nbg;
|
||||
nbg = t;
|
||||
}
|
||||
if (inst->cfg.bold_colour && (attr & ATTR_BOLD))
|
||||
nfg++;
|
||||
nfg |= 1;
|
||||
if (inst->cfg.bold_colour && (attr & ATTR_BLINK))
|
||||
nbg++;
|
||||
nbg |= 1;
|
||||
if (attr & TATTR_ACTCURS) {
|
||||
nfg = NCOLOURS-2;
|
||||
nbg = NCOLOURS-1;
|
||||
|
Reference in New Issue
Block a user