if Colors struct contains clEnd, remove current color set from stack

previously it just did nothing, which wasn't correct behaviour at all.
This commit is contained in:
Andrzej Rybczak
2009-09-16 03:28:29 +00:00
parent f734b43229
commit 84418130fe

View File

@@ -696,7 +696,10 @@ void Window::Scroll(Where where)
Window &Window::operator<<(Colors colors) Window &Window::operator<<(Colors colors)
{ {
if (colors.fg == clEnd || colors.bg == clEnd) if (colors.fg == clEnd || colors.bg == clEnd)
{
*this << clEnd;
return *this; return *this;
}
itsColors.push(colors); itsColors.push(colors);
SetColor(colors.fg, colors.bg); SetColor(colors.fg, colors.bg);
return *this; return *this;