mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug #783
+ Fixed bug #783, which fixes completed and deleted tasks still showing as active (thanks to Adam Wolk).
This commit is contained in:
parent
7c910e46be
commit
90f6f537fe
6 changed files with 21 additions and 29 deletions
1
AUTHORS
1
AUTHORS
|
@ -94,4 +94,5 @@ suggestions:
|
|||
Uli Martens
|
||||
Jonathan Hankins
|
||||
Andreas Kalex
|
||||
Adam Wolk
|
||||
|
||||
|
|
|
@ -94,6 +94,8 @@
|
|||
J. Pilkington).
|
||||
+ Applied patch for Bug #771, which looks for libuuid if uuid_unparse_lower is
|
||||
not located (thanks to Christopher J. Pilkington).
|
||||
+ Fixed bug #783, which fixes completed and deleted tasks still showing as
|
||||
active (thanks to Adam Wolk).
|
||||
|
||||
# Untracked Bugs, biggest first.
|
||||
+ Fixed bug that required the '%YAML' prologue in a YAML import.
|
||||
|
|
|
@ -452,6 +452,7 @@ void Context::clear ()
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Add all the attributes in the task to the filter. All except uuid.
|
||||
/*
|
||||
void Context::autoFilter (Att& a, Filter& f)
|
||||
{
|
||||
// Words are found in the description using the .has modifier.
|
||||
|
@ -532,12 +533,13 @@ void Context::autoFilter (Att& a, Filter& f)
|
|||
a.value ());
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Add all the tags in the task to the filter.
|
||||
/*
|
||||
void Context::autoFilter (Filter& f)
|
||||
{
|
||||
/*
|
||||
// This is now a correct implementation of a filter on the presence or absence
|
||||
// of a tag. The prior code provided the illusion of leftmost partial tag
|
||||
// matches, but was really using the 'contains' and 'nocontains' attribute
|
||||
|
@ -557,8 +559,8 @@ void Context::autoFilter (Filter& f)
|
|||
f.push_back (Att ("tags", "noword", *tag));
|
||||
debug ("auto filter: -" + *tag);
|
||||
}
|
||||
*/
|
||||
}
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// This capability is to answer the question of 'what did I just do to generate
|
||||
|
|
|
@ -77,8 +77,8 @@ private:
|
|||
void determineDataLocation ();
|
||||
void createDefaultConfig ();
|
||||
void loadAliases ();
|
||||
void autoFilter (Att&, Filter&);
|
||||
void autoFilter (Filter&);
|
||||
// void autoFilter (Att&, Filter&);
|
||||
// void autoFilter (Filter&);
|
||||
void updateXtermTitle ();
|
||||
|
||||
public:
|
||||
|
@ -90,23 +90,9 @@ public:
|
|||
Directory extension_dir;
|
||||
Config config;
|
||||
|
||||
/*
|
||||
Filter filter; // TODO Obsolete
|
||||
Sequence sequence; // TODO Obsolete
|
||||
Subst subst; // TODO Obsolete
|
||||
Task task; // TODO Obsolete
|
||||
*/
|
||||
TDB tdb; // TODO Obsolete
|
||||
TDB2 tdb2;
|
||||
/*
|
||||
std::string file_override;
|
||||
std::string var_overrides;
|
||||
*/
|
||||
std::map <std::string, std::string> aliases;
|
||||
/*
|
||||
std::vector <std::string> tagAdditions; // TODO Obsolete
|
||||
std::vector <std::string> tagRemovals; // TODO Obsolete
|
||||
*/
|
||||
Hooks hooks;
|
||||
DOM dom;
|
||||
|
||||
|
|
|
@ -63,7 +63,10 @@ void ColumnStart::measure (Task& task, int& minimum, int& maximum)
|
|||
if (task.has (_attribute))
|
||||
{
|
||||
if (_style == "active")
|
||||
{
|
||||
if (! task.has ("end"))
|
||||
minimum = maximum = context.config.get ("active.indicator").length ();
|
||||
}
|
||||
else
|
||||
ColumnDate::measure (task, minimum, maximum);
|
||||
}
|
||||
|
@ -80,6 +83,7 @@ void ColumnStart::render (
|
|||
{
|
||||
if (_style == "active")
|
||||
{
|
||||
if (! task.has ("end"))
|
||||
lines.push_back (
|
||||
color.colorize (
|
||||
rightJustify (
|
||||
|
|
|
@ -132,12 +132,9 @@ static void colorizePriorityNone (Task& task, const std::string& rule, Color& c)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
static void colorizeActive (Task& task, const std::string& rule, Color& c)
|
||||
{
|
||||
Task::status status = task.getStatus ();
|
||||
|
||||
if (gsColor[rule].nontrivial () &&
|
||||
status != Task::completed &&
|
||||
status != Task::deleted &&
|
||||
task.has ("start"))
|
||||
task.has ("start") &&
|
||||
!task.has ("end"))
|
||||
c.blend (gsColor[rule]);
|
||||
}
|
||||
|
||||
|
@ -157,7 +154,7 @@ static void colorizeProject (Task& task, const std::string& rule, Color& c)
|
|||
std::string project = task.get ("project");
|
||||
std::string rule_trunc = rule.substr (14);
|
||||
|
||||
// Match project names leftmost, just like Context::autoFilter.
|
||||
// Match project names leftmost.
|
||||
if (rule_trunc.length () <= project.length ())
|
||||
if (compare (rule_trunc, project.substr (0, rule_trunc.length ()), sensitive))
|
||||
c.blend (gsColor[rule]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue