From 62399239caca3a2e88e394990b32443d4fdcf02c Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 24 Apr 2021 13:53:23 -0400 Subject: [PATCH] Filter: Make +ACTIVE trigger pendingOnly shortcut --- src/Filter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Filter.cpp b/src/Filter.cpp index 85cb553db..6c05e3a7d 100644 --- a/src/Filter.cpp +++ b/src/Filter.cpp @@ -215,6 +215,7 @@ bool Filter::pendingOnly () const int countXor = 0; int countNot = 0; bool pendingTag = false; + bool activeTag = false; for (const auto& a : Context::getContext ().cli2._args) { @@ -235,7 +236,8 @@ bool Filter::pendingOnly () const 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) return false; - if (pendingTag) + if (pendingTag || activeTag) return true; if (countStatus)