mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Bug Fix - Att::match
- Fixed Att::match bug that succeeded when no modifiers were present.
This commit is contained in:
parent
9d48faa759
commit
cf67e0142c
3 changed files with 10 additions and 19 deletions
17
src/TDB2.cpp
17
src/TDB2.cpp
|
@ -156,6 +156,9 @@ void TDB2::unlock ()
|
|||
// Returns number of filtered tasks.
|
||||
int TDB2::load (std::vector <T2>& tasks, Filter& filter)
|
||||
{
|
||||
// Note: tasks.clear () is deliberately not called, to allow the combination
|
||||
// of multiple files.
|
||||
|
||||
std::string file;
|
||||
int line_number;
|
||||
|
||||
|
@ -173,16 +176,11 @@ int TDB2::load (std::vector <T2>& tasks, Filter& filter)
|
|||
int length = ::strlen (line);
|
||||
if (length > 1)
|
||||
{
|
||||
// TODO Add hidden attribute indicating source?
|
||||
line[length - 1] = '\0'; // Kill \n
|
||||
std::cout << "# line: " << line << std::endl;
|
||||
|
||||
T2 task (line);
|
||||
|
||||
if (filter.pass (task))
|
||||
{
|
||||
// TODO Add hidden attribute indicating source.
|
||||
tasks.push_back (task);
|
||||
}
|
||||
}
|
||||
|
||||
++line_number;
|
||||
|
@ -198,16 +196,11 @@ int TDB2::load (std::vector <T2>& tasks, Filter& filter)
|
|||
int length = ::strlen (line);
|
||||
if (length > 1)
|
||||
{
|
||||
// TODO Add hidden attribute indicating source?
|
||||
line[length - 1] = '\0'; // Kill \n
|
||||
std::cout << "# line: " << line << std::endl;
|
||||
|
||||
T2 task (line);
|
||||
|
||||
if (filter.pass (task))
|
||||
{
|
||||
// TODO Add hidden attribute indicating source.
|
||||
tasks.push_back (task);
|
||||
}
|
||||
}
|
||||
|
||||
++line_number;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue