mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Filter: Make +ACTIVE trigger pendingOnly shortcut
This commit is contained in:
parent
523e2b40fe
commit
62399239ca
1 changed files with 4 additions and 2 deletions
|
@ -215,6 +215,7 @@ bool Filter::pendingOnly () const
|
||||||
int countXor = 0;
|
int countXor = 0;
|
||||||
int countNot = 0;
|
int countNot = 0;
|
||||||
bool pendingTag = false;
|
bool pendingTag = false;
|
||||||
|
bool activeTag = false;
|
||||||
|
|
||||||
for (const auto& a : Context::getContext ().cli2._args)
|
for (const auto& a : Context::getContext ().cli2._args)
|
||||||
{
|
{
|
||||||
|
@ -236,6 +237,7 @@ bool Filter::pendingOnly () const
|
||||||
for (const auto& word : Context::getContext ().cli2._original_args)
|
for (const auto& word : Context::getContext ().cli2._original_args)
|
||||||
{
|
{
|
||||||
if (word.attribute ("raw") == "+PENDING") pendingTag = true;
|
if (word.attribute ("raw") == "+PENDING") pendingTag = true;
|
||||||
|
if (word.attribute ("raw") == "+ACTIVE") activeTag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -245,7 +247,7 @@ bool Filter::pendingOnly () const
|
||||||
if (countOr || countXor || countNot)
|
if (countOr || countXor || countNot)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (pendingTag)
|
if (pendingTag || activeTag)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (countStatus)
|
if (countStatus)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue