mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
- Properly skips all escape sequences if no fg and bg colors are specified.
This commit is contained in:
parent
994f98b57a
commit
0034534803
1 changed files with 4 additions and 1 deletions
|
@ -242,7 +242,10 @@ std::string decode (color c)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string colorize (color fg, color bg, const std::string& input)
|
||||
{
|
||||
return decode (fg) + decode (bg) + input + decode (off);
|
||||
if (fg != nocolor || bg != nocolor)
|
||||
return decode (fg) + decode (bg) + input + decode (off);
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue