Enhancement - echo ID on add

- When a task is added, the new ID is echoed back, for convenience.
  This requires a scan of the pending file, so there is a performance
  hit, and the feature is controlled by the FEATURE_NEW_ID define.
This commit is contained in:
Paul Beckingham
2009-06-20 13:06:53 -04:00
parent 02518e0223
commit f5e0f8b7a6
4 changed files with 17 additions and 9 deletions

View File

@@ -210,7 +210,7 @@ int TDB::loadPending (std::vector <Task>& tasks, Filter& filter)
while (fgets (line, T_LINE_MAX, location->pending))
{
int length = ::strlen (line);
if (length > 1)
if (length > 3) // []\n
{
// TODO Add hidden attribute indicating source?
Task task (line);
@@ -274,7 +274,7 @@ int TDB::loadCompleted (std::vector <Task>& tasks, Filter& filter)
while (fgets (line, T_LINE_MAX, location->completed))
{
int length = ::strlen (line);
if (length > 2)
if (length > 3) // []\n
{
// TODO Add hidden attribute indicating source?