From 75c0e41fcca9eccb02f53cb584f1caf359bbfb28 Mon Sep 17 00:00:00 2001 From: HTunne Date: Sun, 20 Sep 2020 12:14:30 +0100 Subject: [PATCH] Make modify and delete commands respect rc.recurrence.confirmation config option. --- src/commands/CmdDelete.cpp | 7 ++++--- src/commands/CmdModify.cpp | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/commands/CmdDelete.cpp b/src/commands/CmdDelete.cpp index 7f46be024..795a2530a 100644 --- a/src/commands/CmdDelete.cpp +++ b/src/commands/CmdDelete.cpp @@ -137,9 +137,10 @@ int CmdDelete::execute (std::string&) else { std::vector children = Context::getContext ().tdb2.children (task); - if (children.size () && - (Context::getContext ().config.getBoolean ("recurrence.confirmation") || - confirm (STRING_CMD_DELETE_CONFIRM_R))) + if (children.size() && + ((Context::getContext ().config.get ("recurrence.confirmation") == "prompt" + && confirm (STRING_CMD_DELETE_CONFIRM_R)) || + Context::getContext ().config.getBoolean ("recurrence.confirmation"))) { for (auto& child : children) { diff --git a/src/commands/CmdModify.cpp b/src/commands/CmdModify.cpp index da38f312f..e36ca67df 100644 --- a/src/commands/CmdModify.cpp +++ b/src/commands/CmdModify.cpp @@ -200,8 +200,9 @@ int CmdModify::modifyRecurrenceParent ( auto children = Context::getContext ().tdb2.children (task); if (children.size () && - (! Context::getContext ().config.getBoolean ("recurrence.confirmation") || - confirm (STRING_CMD_MODIFY_RECUR))) + ((Context::getContext ().config.get ("recurrence.confirmation") == "prompt" + && confirm (STRING_CMD_MODIFY_RECUR)) || + Context::getContext ().config.getBoolean ("recurrence.confirmation"))) { for (auto& child : children) {