OP_MAIN_SET_FLAG "set a status flag on a message"
OP_MAIN_SYNC_FOLDER "save changes to mailbox"
OP_MAIN_TAG_PATTERN "tag messages matching a pattern"
+OP_MAIN_QUASI_DELETE "delete from mutt, don't touch on disk"
OP_MAIN_UNDELETE_PATTERN "undelete messages matching a pattern"
OP_MAIN_UNTAG_PATTERN "untag messages matching a pattern"
OP_MIDDLE_PAGE "move to the middle of the page"
menu->redraw = REDRAW_FULL;
break;
+ case OP_MAIN_QUASI_DELETE:
+ if (tag) {
+ for (j = 0; j < Context->vcount; j++) {
+ if (Context->hdrs[Context->v2r[j]]->tagged) {
+ Context->hdrs[Context->v2r[j]]->quasi_deleted = TRUE;
+ Context->changed = TRUE;
+ }
+ }
+ } else {
+ CURHDR->quasi_deleted = TRUE;
+ Context->changed = 1;
+ }
+ break;
+
#ifdef USE_SIDEBAR
case OP_SIDEBAR_OPEN:
#endif
{ "mail-key", OP_MAIL_KEY, "\033k" },
{ "decrypt-copy", OP_DECRYPT_COPY, NULL },
{ "decrypt-save", OP_DECRYPT_SAVE, NULL },
+ { "quasi-delete", OP_MAIN_QUASI_DELETE, NULL },
#ifdef USE_SIDEBAR
{ "sidebar-next", OP_SIDEBAR_NEXT, NULL },
{ "decrypt-save", OP_DECRYPT_SAVE, NULL },
{ "what-key", OP_WHAT_KEY, NULL },
+ { "quasi-delete", OP_MAIN_QUASI_DELETE, NULL },
#ifdef USE_SIDEBAR
{ "sidebar-next", OP_SIDEBAR_NEXT, NULL },
unsigned int tagged : 1;
unsigned int deleted : 1;
unsigned int purge : 1; /* skip trash folder when deleting */
+ unsigned int quasi_deleted : 1; /* deleted from mutt, but not modified on disk */
unsigned int changed : 1;
unsigned int attach_del : 1; /* has an attachment marked for deletion */
unsigned int old : 1;
#define this_body ctx->hdrs[j]->content
for (i = 0, j = 0; i < ctx->msgcount; i++)
{
- if ((committing && (!ctx->hdrs[i]->deleted ||
+ if (!ctx->hdrs[i]->quasi_deleted &&
+ ((committing && (!ctx->hdrs[i]->deleted ||
(ctx->magic == MUTT_MAILDIR && option (OPTMAILDIRTRASH)))) ||
- (!committing && ctx->hdrs[i]->active))
+ (!committing && ctx->hdrs[i]->active)))
{
if (i != j)
{