- Zero values no longer generate a 1-char bar in "task ghistory"

This commit is contained in:
Paul Beckingham 2008-06-27 18:05:02 -04:00
parent d199bada33
commit 00b7a5f1b4
3 changed files with 28 additions and 14 deletions

View file

@ -242,8 +242,9 @@ std::string decode (color c)
////////////////////////////////////////////////////////////////////////////////
std::string colorize (color fg, color bg, const std::string& input)
{
if (fg != nocolor || bg != nocolor)
return decode (fg) + decode (bg) + input + decode (off);
if (input.length ())
if (fg != nocolor || bg != nocolor)
return decode (fg) + decode (bg) + input + decode (off);
return input;
}