+ case OP_MAIN_READ_THREAD:
+ case OP_MAIN_READ_SUBTHREAD:
+
+ CHECK_MSGCOUNT;
+ CHECK_VISIBLE;
+ CHECK_READONLY;
+
+ CHECK_MX_ACL (Context, ACL_SEEN, _("Marking as read"));
+
+ rc = mutt_thread_set_flag (CURHDR, M_READ, 1,
+ op == OP_MAIN_READ_THREAD ? 0 : 1);
+
+ if (rc != -1) {
+ if (option (OPTRESOLVE)) {
+ if ((menu->current = (op == OP_MAIN_READ_THREAD ?
+ mutt_next_thread (CURHDR) :
+ mutt_next_subthread (CURHDR))) == -1)
+ menu->current = menu->oldcurrent;
+ }
+ menu->redraw = REDRAW_INDEX | REDRAW_STATUS;
+ }
+ break;
+
+ case OP_RECALL_MESSAGE:
+
+ CHECK_ATTACH;
+ ci_send_message (SENDPOSTPONED, NULL, NULL, Context, NULL);
+ menu->redraw = REDRAW_FULL;
+ break;
+
+ case OP_RESEND:
+
+ CHECK_ATTACH;
+ CHECK_MSGCOUNT;
+ CHECK_VISIBLE;
+
+ if (tag) {
+ for (j = 0; j < Context->vcount; j++) {
+ if (Context->hdrs[Context->v2r[j]]->tagged)
+ mutt_resend_message (NULL, Context,
+ Context->hdrs[Context->v2r[j]]);
+ }
+ }
+ else
+ mutt_resend_message (NULL, Context, CURHDR);
+
+ menu->redraw = REDRAW_FULL;
+ break;
+
+#ifdef USE_NNTP
+ case OP_POST:
+ case OP_FOLLOWUP:
+ case OP_FORWARD_TO_GROUP:
+
+ CHECK_ATTACH;
+ if ((op == OP_FOLLOWUP || op == OP_FORWARD_TO_GROUP) &&
+ Context && Context->msgcount == 0) {
+ mutt_error (_("There are no messages."));
+ sleep (2);
+ }
+ else if (op != OP_FOLLOWUP || !CURHDR->env->followup_to ||
+ str_casecmp (CURHDR->env->followup_to, "poster") ||
+ query_quadoption (OPT_FOLLOWUPTOPOSTER,
+ _("Reply by mail as poster prefers?")) !=
+ M_YES) {
+ if (Context && Context->magic == M_NNTP
+ && !((NNTP_DATA *) Context->data)->allowed
+ && query_quadoption (OPT_TOMODERATED,
+ _
+ ("Posting to this group not allowed, may be moderated. Continue?"))
+ != M_YES)
+ break;
+ if (op == OP_POST)
+ ci_send_message (SENDNEWS, NULL, NULL, Context, NULL);
+ else {
+ CHECK_MSGCOUNT;
+ if (op == OP_FOLLOWUP)
+ ci_send_message (SENDNEWS | SENDREPLY, NULL, NULL, Context,
+ tag ? NULL : CURHDR);
+ else
+ ci_send_message (SENDNEWS | SENDFORWARD, NULL, NULL, Context,
+ tag ? NULL : CURHDR);
+ }
+ menu->redraw = REDRAW_FULL;
+ break;
+ }
+#endif
+
+ case OP_REPLY:
+
+ CHECK_ATTACH;
+ CHECK_MSGCOUNT;
+ CHECK_VISIBLE;
+
+ if (option (OPTPGPAUTODEC) &&
+ (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
+
+ ci_send_message (SENDREPLY, NULL, NULL, Context, tag ? NULL : CURHDR);
+ menu->redraw = REDRAW_FULL;
+ break;
+
+ case OP_SHELL_ESCAPE:
+
+ mutt_shell_escape ();
+ MAYBE_REDRAW (menu->redraw);
+ break;
+
+ case OP_TAG_THREAD:
+ case OP_TAG_SUBTHREAD:
+
+ CHECK_MSGCOUNT;
+ CHECK_VISIBLE;
+ rc = mutt_thread_set_flag (CURHDR, M_TAG, !CURHDR->tagged,
+ op == OP_TAG_THREAD ? 0 : 1);
+
+ if (rc != -1) {
+ if (option (OPTRESOLVE)) {
+ menu->current = mutt_next_thread (CURHDR);
+
+ if (menu->current == -1)
+ menu->current = menu->oldcurrent;
+ }
+ menu->redraw = REDRAW_INDEX | REDRAW_STATUS;
+ }
+ break;
+
+ case OP_UNDELETE:
+
+ CHECK_MSGCOUNT;
+ CHECK_VISIBLE;
+ CHECK_READONLY;
+
+ CHECK_MX_ACL (Context, ACL_DELETE, _("Undeletion"));
+
+ if (tag) {
+ mutt_tag_set_flag (M_DELETE, 0);
+ mutt_tag_set_flag (M_PURGED, 0);
+ menu->redraw = REDRAW_INDEX;
+ }
+ else {
+ mutt_set_flag (Context, CURHDR, M_DELETE, 0);
+ mutt_set_flag (Context, CURHDR, M_PURGED, 0);
+ if (option (OPTRESOLVE) && menu->current < Context->vcount - 1) {
+ menu->current++;
+ menu->redraw = REDRAW_MOTION_RESYNCH;
+ }
+ else
+ menu->redraw = REDRAW_CURRENT;
+ }
+ menu->redraw |= REDRAW_STATUS;
+ break;
+
+ case OP_UNDELETE_THREAD:
+ case OP_UNDELETE_SUBTHREAD:
+
+ CHECK_MSGCOUNT;
+ CHECK_VISIBLE;
+ CHECK_READONLY;
+
+ CHECK_MX_ACL (Context, ACL_DELETE, _("Undeletion"));
+
+ rc = mutt_thread_set_flag (CURHDR, M_DELETE, 0,
+ op == OP_UNDELETE_THREAD ? 0 : 1)
+ + mutt_thread_set_flag (CURHDR, M_PURGED, 0,
+ op == OP_UNDELETE_THREAD ? 0 : 1);
+
+ if (rc > -1) {
+ if (option (OPTRESOLVE)) {
+ if (op == OP_UNDELETE_THREAD)
+ menu->current = mutt_next_thread (CURHDR);
+ else
+ menu->current = mutt_next_subthread (CURHDR);
+
+ if (menu->current == -1)
+ menu->current = menu->oldcurrent;
+ }
+ menu->redraw = REDRAW_INDEX | REDRAW_STATUS;
+ }
+ break;
+
+ case OP_VERSION:
+ mutt_version ();
+ break;
+
+ case OP_BUFFY_LIST:
+ if (option (OPTFORCEBUFFYCHECK))
+ buffy_check (1);
+ buffy_list ();
+ menu->redraw = REDRAW_FULL;
+ break;
+
+ case OP_VIEW_ATTACHMENTS:
+ CHECK_MSGCOUNT;
+ CHECK_VISIBLE;
+ mutt_view_attachments (CURHDR);
+ if (CURHDR->attach_del)
+ Context->changed = 1;
+ menu->redraw = REDRAW_FULL;
+ break;
+
+ case OP_END_COND:
+ break;
+
+ case OP_WHAT_KEY:
+ mutt_what_key ();
+ break;
+
+ case OP_REBUILD_CACHE:
+ mx_rebuild_cache ();
+ break;
+
+ case OP_SIDEBAR_SCROLL_UP:
+ case OP_SIDEBAR_SCROLL_DOWN:
+ case OP_SIDEBAR_NEXT:
+ case OP_SIDEBAR_PREV:
+ case OP_SIDEBAR_NEXT_NEW:
+ case OP_SIDEBAR_PREV_NEW:
+ sidebar_scroll (op, menu->menu);
+ break;
+ default:
+ if (menu->menu == MENU_MAIN)
+ km_error_key (MENU_MAIN);