From bb2eb5f26655da710bdf664b94785947a447918f Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 23 Sep 2009 23:26:39 -0400 Subject: [PATCH] Feature - 256-color support - Added precautionary bit reset for bold and bright in 256-color mode. Not sure if it is important, but it's cleaner. --- src/Color.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Color.cpp b/src/Color.cpp index b16db5892..8862b8ca0 100644 --- a/src/Color.cpp +++ b/src/Color.cpp @@ -166,6 +166,8 @@ Color::Color (const std::string& spec) } value |= _COLOR_256; + value &= ~_COLOR_BOLD; + value &= ~_COLOR_BRIGHT; } // rgbRGB, where 0 <= R,G,B <= 5. @@ -197,6 +199,8 @@ Color::Color (const std::string& spec) } value |= _COLOR_256; + value &= ~_COLOR_BOLD; + value &= ~_COLOR_BRIGHT; } // colorN, where 0 <= N <= 255. @@ -218,6 +222,8 @@ Color::Color (const std::string& spec) } value |= _COLOR_256; + value &= ~_COLOR_BOLD; + value &= ~_COLOR_BRIGHT; } else throw std::string ("The color '") + *it + "' is not recognized.";