This is based on the patch by Cedric Duval.
Modifications are:
* Use the exising M_PURGE flag from the trash folder patch, rather
than adding a separate flag.
* Undelete operations are already handled by the trash folder patch.
OP_PREV_LINE "scroll up one line"
OP_PREV_PAGE "move to the previous page"
OP_PRINT "print the current entry"
+OP_PURGE_MESSAGE "really delete the current entry, bypassing the trash folder"
OP_QUERY "query external program for addresses"
OP_QUERY_APPEND "append new query results to current results"
OP_QUIT "save changes to mailbox and quit"
MAYBE_REDRAW (menu->redraw);
break;
+ case OP_PURGE_MESSAGE:
case OP_DELETE:
CHECK_MSGCOUNT;
if (tag)
{
mutt_tag_set_flag (MUTT_DELETE, 1);
+ mutt_tag_set_flag (MUTT_PURGE, (op == OP_PURGE_MESSAGE));
if (option (OPTDELETEUNTAG))
mutt_tag_set_flag (MUTT_TAG, 0);
menu->redraw = REDRAW_INDEX;
else
{
mutt_set_flag (Context, CURHDR, MUTT_DELETE, 1);
+ mutt_set_flag (Context, CURHDR, MUTT_PURGE, (op == OP_PURGE_MESSAGE));
if (option (OPTDELETEUNTAG))
mutt_set_flag (Context, CURHDR, MUTT_TAG, 0);
if (option (OPTRESOLVE))
{ "toggle-write", OP_TOGGLE_WRITE, "%" },
{ "next-thread", OP_MAIN_NEXT_THREAD, "\016" },
{ "next-subthread", OP_MAIN_NEXT_SUBTHREAD, "\033n" },
+ { "purge-message", OP_PURGE_MESSAGE, NULL },
{ "query", OP_QUERY, "Q" },
{ "quit", OP_QUIT, "q" },
{ "reply", OP_REPLY, "r" },
{ "print-message", OP_PRINT, "p" },
{ "previous-thread", OP_MAIN_PREV_THREAD, "\020" },
{ "previous-subthread",OP_MAIN_PREV_SUBTHREAD, "\033p" },
+ { "purge-message", OP_PURGE_MESSAGE, NULL },
{ "quit", OP_QUIT, "Q" },
{ "exit", OP_EXIT, "q" },
{ "reply", OP_REPLY, "r" },
MAYBE_REDRAW (redraw);
break;
+ case OP_PURGE_MESSAGE:
case OP_DELETE:
CHECK_MODE(IsHeader (extra));
CHECK_READONLY;
CHECK_ACL(MUTT_ACL_DELETE, _("Cannot delete message"));
mutt_set_flag (Context, extra->hdr, MUTT_DELETE, 1);
+ mutt_set_flag (Context, extra->hdr, MUTT_PURGE, (ch == OP_PURGE_MESSAGE));
if (option (OPTDELETEUNTAG))
mutt_set_flag (Context, extra->hdr, MUTT_TAG, 0);
redraw = REDRAW_STATUS | REDRAW_INDEX;