mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-30 22:43:24 +02:00
Bug Fix - Color endianness
- Fixed "bug" that caused "red on black" to be emitted as ^[[40;31m instead of the expected ^[[31;40m, which is what the unit tests are looking for.
This commit is contained in:
parent
1bb907f76d
commit
179b51278f
2 changed files with 8 additions and 8 deletions
|
@ -465,18 +465,18 @@ std::string Color::colorize (const std::string& input)
|
|||
result << "4";
|
||||
}
|
||||
|
||||
if (value & _COLOR_HASBG)
|
||||
{
|
||||
if (count++) result << ";";
|
||||
result << ((value & _COLOR_BRIGHT ? 99 : 39) + ((value & _COLOR_BG) >> 8));
|
||||
}
|
||||
|
||||
if (value & _COLOR_HASFG)
|
||||
{
|
||||
if (count++) result << ";";
|
||||
result << (29 + (value & _COLOR_FG));
|
||||
}
|
||||
|
||||
if (value & _COLOR_HASBG)
|
||||
{
|
||||
if (count++) result << ";";
|
||||
result << ((value & _COLOR_BRIGHT ? 99 : 39) + ((value & _COLOR_BG) >> 8));
|
||||
}
|
||||
|
||||
result << "m" << input << "\033[0m";
|
||||
return result.str ();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue