mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CLI2: Generalize _context_filter_added latch name
This commit is contained in:
parent
510786ff91
commit
a2c3d224d3
2 changed files with 4 additions and 4 deletions
|
@ -564,7 +564,7 @@ void CLI2::addFilter (const std::string& arg)
|
|||
void CLI2::addContextFilter ()
|
||||
{
|
||||
// Recursion block.
|
||||
if (_context_filter_added)
|
||||
if (_context_added)
|
||||
return;
|
||||
|
||||
// Detect if any context is set, and bail out if not
|
||||
|
@ -595,7 +595,7 @@ void CLI2::addContextFilter ()
|
|||
Context::getContext ().debug ("Context '" + contextName + "' not defined.");
|
||||
else
|
||||
{
|
||||
_context_filter_added = true;
|
||||
_context_added = true;
|
||||
addFilter (contextFilter);
|
||||
if (Context::getContext ().verbose ("context"))
|
||||
Context::getContext ().footnote (format ("Context '{1}' set. Use 'task context none' to remove.", contextName));
|
||||
|
@ -610,7 +610,7 @@ void CLI2::prepareFilter ()
|
|||
// Clear and re-populate.
|
||||
_id_ranges.clear ();
|
||||
_uuid_list.clear ();
|
||||
_context_filter_added = false;
|
||||
_context_added = false;
|
||||
|
||||
// Remove all the syntactic sugar for FILTERs.
|
||||
lexFilterArgs ();
|
||||
|
|
|
@ -113,7 +113,7 @@ public:
|
|||
|
||||
std::vector <std::pair <std::string, std::string>> _id_ranges {};
|
||||
std::vector <std::string> _uuid_list {};
|
||||
bool _context_filter_added {false};
|
||||
bool _context_added {false};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue