TW-1697: Inconsistent failure mode on invalid task id

- Thanks to Daniel Shahaf.
This commit is contained in:
Paul Beckingham 2016-02-02 01:29:22 -05:00
parent ea82d88816
commit f6a7a8720e
2 changed files with 65 additions and 37 deletions

View file

@ -75,6 +75,12 @@ int CmdEdit::execute (std::string&)
std::vector <Task> filtered;
filter.subset (filtered);
if (! filtered.size ())
{
context.footnote (STRING_FEEDBACK_NO_MATCH);
return 1;
}
// Find number of matching tasks.
for (auto& task : filtered)
{