mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-29 17:07:19 +02:00
Color Rules
- Corrected bug in colorizeScheduled to properly consider the scheduled date.
This commit is contained in:
parent
52dfa8da1e
commit
981121799c
1 changed files with 3 additions and 1 deletions
|
@ -39,6 +39,7 @@ extern Context context;
|
||||||
|
|
||||||
static std::map <std::string, Color> gsColor;
|
static std::map <std::string, Color> gsColor;
|
||||||
static std::vector <std::string> gsPrecedence;
|
static std::vector <std::string> gsPrecedence;
|
||||||
|
static Date now;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void initializeColorRules ()
|
void initializeColorRules ()
|
||||||
|
@ -143,7 +144,8 @@ static void colorizeActive (Task& task, const std::string& rule, Color& c)
|
||||||
static void colorizeScheduled (Task& task, const std::string& rule, Color& c)
|
static void colorizeScheduled (Task& task, const std::string& rule, Color& c)
|
||||||
{
|
{
|
||||||
if (gsColor[rule].nontrivial () &&
|
if (gsColor[rule].nontrivial () &&
|
||||||
task.has ("scheduled"))
|
task.has ("scheduled") &&
|
||||||
|
Date (task.get_date ("scheduled")) < now)
|
||||||
c.blend (gsColor[rule]);
|
c.blend (gsColor[rule]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue