From d460e604ffdde52475a84866a6f16a0618746cda Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 17 Aug 2010 23:17:44 -0400 Subject: [PATCH] Bug #470 - 'task rc.color.alternate:none list' shows incorrect colors - Fixed bug #470, which caused task to not support the color 'none'. Simultaneous vitapi bug fix. --- ChangeLog | 1 + src/Color.cpp | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b617ede2..890d67cd5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -55,6 +55,7 @@ used, with few tasks. + Fixed bug #466, which gave the wrong error message when a custom report was missing a direction indicator for the sort order. + + Fixed bug #470, which caused task to not support the color 'none'. + Fixed problem with command line configuration overrides that had no values. + Fixed problem with the 'undo' command not observing the rc.color or the diff --git a/src/Color.cpp b/src/Color.cpp index a06034312..bc9cc1876 100644 --- a/src/Color.cpp +++ b/src/Color.cpp @@ -127,15 +127,18 @@ Color::Color (const std::string& spec) // X where X is one of black, red, blue ... else if ((index = find (word)) != -1) { - if (bg) + if (index) { - bg_value |= _COLOR_HASBG; - bg_value |= index << 8; - } - else - { - fg_value |= _COLOR_HASFG; - fg_value |= index; + if (bg) + { + bg_value |= _COLOR_HASBG; + bg_value |= index << 8; + } + else + { + fg_value |= _COLOR_HASFG; + fg_value |= index; + } } }