summaryrefslogtreecommitdiffstats
path: root/commands.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 /commands.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 'commands.c')
-rw-r--r--commands.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/commands.c b/commands.c
index c5811bd4..2202a673 100644
--- a/commands.c
+++ b/commands.c
@@ -717,6 +717,7 @@ int _mutt_save_message (HEADER *h, CONTEXT *ctx, int delete, int decode, int dec
if (delete)
{
mutt_set_flag (Context, h, MUTT_DELETE, 1);
+ mutt_set_flag (Context, h, MUTT_PURGE, 1);
if (option (OPTDELETEUNTAG))
mutt_set_flag (Context, h, MUTT_TAG, 0);
}