summaryrefslogtreecommitdiffstats
path: root/flags.c
diff options
context:
space:
mode:
authorDavid Champion <dgc@bikeshed.us>2016-11-16 15:43:50 -0800
committerDavid Champion <dgc@bikeshed.us>2016-11-16 15:43:50 -0800
commitfde1e8fdb1653424f8c25032d6a9f3717c39cdcc (patch)
treee3abfef05be5e471e4e80b368f20c2d6c8f2aada /flags.c
parent9183ee7033b420f53bf7e677b042e2035fcfea6a (diff)
When $flag_safe is set, flagged messages cannot be deleted.
This saves them from bulk operations on threads and tagged messages. To remove a flagged message, first unflag it.
Diffstat (limited to 'flags.c')
-rw-r--r--flags.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/flags.c b/flags.c
index 3e802513..e47950dc 100644
--- a/flags.c
+++ b/flags.c
@@ -45,7 +45,8 @@ void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx)
if (bf)
{
- if (!h->deleted && !ctx->readonly)
+ if (!h->deleted && !ctx->readonly
+ && (!h->flagged || !option(OPTFLAGSAFE)))
{
h->deleted = 1;
update = 1;