1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-05-03 02:32:09 -05:00

On monochrome displays, display the cursor in reverse video so that it's

visible on reversed out text.  This only applies to active block cursors for
now.

[originally from svn r5698]
This commit is contained in:
Ben Harris 2005-04-27 21:42:51 +00:00
parent 1aee4d81e0
commit 61199b6a04

View File

@ -1895,7 +1895,7 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len,
nfg = ((monochrome ? ATTR_DEFFG : (attr & ATTR_FGMASK)) >> ATTR_FGSHIFT);
nbg = ((monochrome ? ATTR_DEFBG : (attr & ATTR_BGMASK)) >> ATTR_BGSHIFT);
if (attr & ATTR_REVERSE) {
if (!!(attr & ATTR_REVERSE) ^ (monochrome && (attr & TATTR_ACTCURS))) {
t = nfg;
nfg = nbg;
nbg = t;
@ -1908,7 +1908,7 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len,
if (nbg < 16) nbg |= 8;
else if (nbg >= 256) nbg |= 1;
}
if (attr & TATTR_ACTCURS) {
if ((attr & TATTR_ACTCURS) && !monochrome) {
nfg = 260;
nbg = 261;
}