mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
ViewTask
- Free space of empty columns if rc.print_empty_columns is set. They were previously sent into nirvana, making the ViewTask destructor miss them.
This commit is contained in:
parent
d49a2614ba
commit
f8a44819c3
1 changed files with 12 additions and 3 deletions
|
@ -154,10 +154,19 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
|
|||
ideal.push_back (global_ideal);
|
||||
}
|
||||
|
||||
if (! print_empty_columns && global_min != 0)
|
||||
if (! print_empty_columns)
|
||||
{
|
||||
nonempty_columns.push_back (_columns[i]);
|
||||
nonempty_sort.push_back (_sort[i]);
|
||||
if (global_min != 0) // Column is nonempty
|
||||
{
|
||||
nonempty_columns.push_back (_columns[i]);
|
||||
nonempty_sort.push_back (_sort[i]);
|
||||
}
|
||||
else // Column is empty, drop it
|
||||
{
|
||||
// Note: This is safe to do because we set _columns = nonempty_columns
|
||||
// after iteration over _columns is finished.
|
||||
delete _columns[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue