summaryrefslogtreecommitdiffstats
path: root/mbox.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2016-07-17 19:31:09 -0700
committerKevin McCarthy <kevin@8t8.us>2016-07-17 19:31:09 -0700
commit347c517c5d8abc78ae0e643df8b051ba95139282 (patch)
tree583de97d2e24b77dfa1448c23a48902e2c470f70 /mbox.c
parent4c3fa09f102bbad32bd88db1db53e55ed5939b31 (diff)
Add the trash folder patch.
This is based on the trash folder patch by Cedric Duval. Modifications to the original patch are: * Use a flag called M_PURGE instead of M_APPENDED. The same flag is then used in the following "purge" patch instead of adding a different flag. * Removed the counter in context. The existing context->deleted is all that's needed. * Removed the "auto unset M_PURGE" when M_DELETED is unset inside _mutt_set_flag(), although this is convenient, it easily leads to header->purge not being reset in a few situations. * Reset purge flag along with the deleted flag if $delete is answered no. * Set M_PURGE on an edited message. (edit_one_message()) * Preserve purge flag in mutt_reopen_mailbox() * Turn off OPTCONFIRMAPPEND when saving to the trash, rather than hardcoding it off in mutt_save_confirm(). That way, normal save to the folder will respect the option.
Diffstat (limited to 'mbox.c')
-rw-r--r--mbox.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mbox.c b/mbox.c
index 12d42364..36dd81e7 100644
--- a/mbox.c
+++ b/mbox.c
@@ -1265,6 +1265,7 @@ int mutt_reopen_mailbox (CONTEXT *ctx, int *index_hint)
mutt_set_flag (ctx, ctx->hdrs[i], MUTT_READ, old_hdrs[j]->read);
}
mutt_set_flag (ctx, ctx->hdrs[i], MUTT_DELETE, old_hdrs[j]->deleted);
+ mutt_set_flag (ctx, ctx->hdrs[i], MUTT_PURGE, old_hdrs[j]->purge);
mutt_set_flag (ctx, ctx->hdrs[i], MUTT_TAG, old_hdrs[j]->tagged);
/* we don't need this header any more */