mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Bug #444 - Interactive undo locks pending.data and doesn't give it up
- TDB::undo () now exits gracefully when a user declines to proceed with the undo, ensuring context.tdb.unlock () is called
This commit is contained in:
parent
96bd3ff8db
commit
189fdaf9ac
2 changed files with 7 additions and 1 deletions
|
@ -933,7 +933,11 @@ void TDB::undo ()
|
|||
|
||||
// Output displayed, now confirm.
|
||||
if (!confirm ("The undo command is not reversible. Are you sure you want to revert to the previous state?"))
|
||||
throw std::string ("No changes made.");
|
||||
{
|
||||
std::cout << "No changes made." << std::endl;
|
||||
context.hooks.trigger ("post-undo");
|
||||
return;
|
||||
}
|
||||
|
||||
// Extract identifying uuid.
|
||||
std::string uuid;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue