This commit is contained in:
Pankaj Bhojwani 2021-09-10 10:15:44 -07:00
parent 7551212f26
commit fdd80177ba

View file

@ -116,12 +116,16 @@ std::pair<COLORREF, COLORREF> TextAttribute::CalculateRgbColors(const std::array
{
auto bgIndex = _background.IsDefault() ? 16 : _background.GetIndex();
auto fgIndex = _foreground.IsDefault() ? 17 : _foreground.GetIndex();
fg = adjustedForegroundColors.value()[bgIndex][fgIndex];
if (IsReverseVideo() ^ reverseScreenMode)
{
std::swap(fg, bg);
bg = _foreground.GetColor(colorTable, defaultFgColor);
fg = adjustedForegroundColors.value()[fgIndex][bgIndex];
reversed = true;
}
else
{
fg = adjustedForegroundColors.value()[bgIndex][fgIndex];
}
}
else
{