mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-30 22:43:24 +02:00
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.
This commit is contained in:
parent
675df6487a
commit
bb2eb5f266
1 changed files with 6 additions and 0 deletions
|
@ -166,6 +166,8 @@ Color::Color (const std::string& spec)
|
||||||
}
|
}
|
||||||
|
|
||||||
value |= _COLOR_256;
|
value |= _COLOR_256;
|
||||||
|
value &= ~_COLOR_BOLD;
|
||||||
|
value &= ~_COLOR_BRIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// rgbRGB, where 0 <= R,G,B <= 5.
|
// rgbRGB, where 0 <= R,G,B <= 5.
|
||||||
|
@ -197,6 +199,8 @@ Color::Color (const std::string& spec)
|
||||||
}
|
}
|
||||||
|
|
||||||
value |= _COLOR_256;
|
value |= _COLOR_256;
|
||||||
|
value &= ~_COLOR_BOLD;
|
||||||
|
value &= ~_COLOR_BRIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// colorN, where 0 <= N <= 255.
|
// colorN, where 0 <= N <= 255.
|
||||||
|
@ -218,6 +222,8 @@ Color::Color (const std::string& spec)
|
||||||
}
|
}
|
||||||
|
|
||||||
value |= _COLOR_256;
|
value |= _COLOR_256;
|
||||||
|
value &= ~_COLOR_BOLD;
|
||||||
|
value &= ~_COLOR_BRIGHT;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw std::string ("The color '") + *it + "' is not recognized.";
|
throw std::string ("The color '") + *it + "' is not recognized.";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue