Make the cursor colour override true colour.

Otherwise, moving the cursor (at least in active, filled-cell mode) on
to a true-coloured character cell causes it to vanish completely
because the cell's colours override the thing that differentiates the
cursor.
This commit is contained in:
Simon Tatham 2017-10-05 20:30:04 +01:00
Родитель 1adf211d70
Коммит 262376a054
2 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -3274,6 +3274,7 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len,
else if (nbg >= 256) nbg |= 1;
}
if ((attr & TATTR_ACTCURS) && !monochrome) {
truecolour.fg = truecolour.bg = optionalrgb_none;
nfg = 260;
nbg = 261;
}

Просмотреть файл

@ -3429,6 +3429,7 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len,
y += offset_height;
if ((attr & TATTR_ACTCURS) && (cursor_type == 0 || term->big_cursor)) {
truecolour.fg = truecolour.bg = optionalrgb_none;
attr &= ~(ATTR_REVERSE|ATTR_BLINK|ATTR_COLOURS);
/* cursor fg and bg */
attr |= (260 << ATTR_FGSHIFT) | (261 << ATTR_BGSHIFT);