X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-ui%2Fcurs_main.c;h=2103d25f3ad145c0328fee71a5c87beb82972a40;hp=0fa37cb75f4b9f6a63d3cf4ae38a732441d86d4a;hb=193714be08fc91ae77ddd401c1273d1b0d42845d;hpb=a552eb852c1d02cedb0c6517603ce44a219e3110 diff --git a/lib-ui/curs_main.c b/lib-ui/curs_main.c index 0fa37cb..2103d25 100644 --- a/lib-ui/curs_main.c +++ b/lib-ui/curs_main.c @@ -10,13 +10,12 @@ * please see the file GPL in the top level source directory. */ -#include +#include #include #include -#include +#include "pop.h" -#include "curses.h" #include "menu.h" #include "mutt.h" @@ -27,11 +26,12 @@ #include "recvattach.h" #include "buffy.h" #include "thread.h" +#include "score.h" #include #ifdef USE_NNTP -#include +#include "nntp.h" #endif static const char *No_mailbox_is_open = N_("No mailbox is open."); @@ -86,7 +86,6 @@ static const char *No_visible = N_("No visible messages."); #define CURHDR Context->hdrs[Context->v2r[menu->current]] #define OLDHDR Context->hdrs[Context->v2r[menu->oldcurrent]] #define UNREAD(h) mutt_thread_contains_unread (Context, h) -#define SW (option(OPTMBOXPANE)?SidebarWidth:0) extern size_t UngetCount; @@ -97,9 +96,6 @@ void index_make_entry (char *s, ssize_t l, struct menu_t * menu, int num) HEADER *h = Context->hdrs[Context->v2r[num]]; THREAD *tmp; - if (option(OPTARROWCURSOR)) - flag |= M_FORMAT_ARROWCURSOR; - if ((Sort & SORT_MASK) == SORT_THREADS && h->tree) { flag |= M_FORMAT_TREE; /* display the thread tree */ if (h->display_subject) @@ -352,38 +348,12 @@ static void resort_index (MUTTMENU * menu) menu->redraw = REDRAW_INDEX | REDRAW_STATUS; } -struct mapping_t IndexHelp[] = { - {N_("Quit"), OP_QUIT}, - {N_("Del"), OP_DELETE}, - {N_("Undel"), OP_UNDELETE}, - {N_("Save"), OP_SAVE}, - {N_("Mail"), OP_MAIL}, - {N_("Reply"), OP_REPLY}, - {N_("Group"), OP_GROUP_REPLY}, - {N_("Help"), OP_HELP}, - {NULL, OP_NULL} -}; - -#ifdef USE_NNTP -struct mapping_t IndexNewsHelp[] = { - {N_("Quit"), OP_QUIT}, - {N_("Del"), OP_DELETE}, - {N_("Undel"), OP_UNDELETE}, - {N_("Save"), OP_SAVE}, - {N_("Post"), OP_POST}, - {N_("Followup"), OP_FOLLOWUP}, - {N_("Catchup"), OP_CATCHUP}, - {N_("Help"), OP_HELP}, - {NULL, OP_NULL} -}; -#endif - /* This function handles the message index window as well as commands returned * from the pager (MENU_PAGER). */ int mutt_index_menu (void) { - char buf[LONG_STRING], helpstr[STRING]; + char buf[LONG_STRING]; int flags; int op = OP_NULL; int done = 0; /* controls when to exit the "event" loop */ @@ -393,10 +363,10 @@ int mutt_index_menu (void) int oldcount = -1; int rc = -1; MUTTMENU *menu; - char *cp; /* temporary variable. */ + const char *cp; /* temporary variable. */ int index_hint; /* used to restore cursor position */ int do_buffy_notify = 1; - int closed = 0; /* did we OP_QUIT or OP_EXIT out of this menu? */ + int closed = 0; /* did we OP_QUIT or OP_EXIT out of this menu? */ int attach_msg = option (OPTATTACHMSG); menu = mutt_new_menu (); @@ -406,13 +376,6 @@ int mutt_index_menu (void) menu->make_entry = (void *) index_make_entry; menu->color = index_color; menu->current = ci_first_message (); - menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_MAIN, -#ifdef USE_NNTP - (Context - && (Context->magic == - M_NNTP)) ? IndexNewsHelp : -#endif - IndexHelp); if (!attach_msg) { buffy_check (0); /* force the buffy check after we enter the folder */ @@ -474,7 +437,7 @@ int mutt_index_menu (void) sidebar_draw (); mutt_message (_("New mail in this mailbox.")); - if (MCore.beep_new) + if (mod_core.beep_new) beep (); } else if (check == M_FLAGS) @@ -501,7 +464,7 @@ int mutt_index_menu (void) menu->redraw |= REDRAW_SIDEBAR; } if (do_buffy_notify) { - if (buffy_notify () && MCore.beep_new) + if (buffy_notify () && mod_core.beep_new) beep (); } else @@ -534,14 +497,13 @@ int mutt_index_menu (void) if (menu->redraw & REDRAW_STATUS) { menu_status_line (buf, sizeof (buf), menu, NONULL (Status)); - CLEARLINE (option (OPTSTATUSONTOP) ? 0 : LINES - 2); - sidebar_draw_frames(); - SETCOLOR (MT_COLOR_STATUS); - BKGDSET (MT_COLOR_STATUS); - move(option (OPTSTATUSONTOP) ? 0 : LINES - 2,SW); - mutt_paddstr (COLS-SW, buf); - SETCOLOR (MT_COLOR_NORMAL); - BKGDSET (MT_COLOR_NORMAL); + CLEARLINE(main_w, 0); + SETCOLOR(main_w, MT_COLOR_STATUS); + BKGDSET(main_w, MT_COLOR_STATUS); + wmove(main_w, 0, 0); + mutt_paddstr (main_w, getmaxx(main_w), buf); + SETCOLOR(main_w, MT_COLOR_NORMAL); + BKGDSET(main_w, MT_COLOR_NORMAL); sidebar_set_buffystats (Context); menu->redraw &= ~REDRAW_STATUS; if (option (OPTXTERMSETTITLES)) { @@ -558,34 +520,18 @@ int mutt_index_menu (void) menu->oldcurrent = menu->current; else menu->oldcurrent = -1; - - if (option (OPTARROWCURSOR)) - move (menu->current - menu->top + menu->offset, 2); - else if (option (OPTBRAILLEFRIENDLY)) - move (menu->current - menu->top + menu->offset, 0); - else - move (menu->current - menu->top + menu->offset, COLS - 1); mutt_refresh (); -#if defined (USE_SLANG_CURSES) || defined (HAVE_RESIZETERM) if (SigWinch) { mutt_flushinp (); - mutt_resize_screen (); + ui_layout_resize(); menu->redraw = REDRAW_FULL; menu->menu = MENU_MAIN; - SigWinch = 0; menu->top = 0; /* so we scroll the right amount */ - /* - * force a real complete redraw. clrtobot() doesn't seem to be able - * to handle every case without this. - */ - clearok (stdscr, TRUE); continue; } -#endif op = km_dokey (MENU_MAIN); - if (op == -1) continue; /* either user abort or timeout */ @@ -607,13 +553,13 @@ int mutt_index_menu (void) tag = 1; /* give visual indication that the next command is a tag- command */ - mvaddstr (LINES - 1, 0, "tag-"); - clrtoeol (); + mvwaddstr (main_w, LINES - 1, 0, "tag-"); + wclrtoeol (main_w); /* get the real command */ if ((op = km_dokey (MENU_MAIN)) == OP_TAG_PREFIX) { /* abort tag sequence */ - CLEARLINE (LINES - 1); + CLEARLINE(main_w, LINES - 1); continue; } } @@ -642,13 +588,13 @@ int mutt_index_menu (void) tag = 1; /* give visual indication that the next command is a tag- command */ - mvaddstr (LINES - 1, 0, "tag-"); - clrtoeol (); + mvwaddstr (main_w, LINES - 1, 0, "tag-"); + wclrtoeol (main_w); /* get the real command */ if ((op = km_dokey (MENU_MAIN)) == OP_TAG_PREFIX) { /* abort tag sequence */ - CLEARLINE (LINES - 1); + CLEARLINE(main_w, LINES - 1); continue; } } @@ -822,7 +768,6 @@ int mutt_index_menu (void) #endif case OP_JUMP: - CHECK_MSGCOUNT; CHECK_VISIBLE; if (isdigit (LastKey)) @@ -873,7 +818,6 @@ int mutt_index_menu (void) */ case OP_MAIN_DELETE_PATTERN: - CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; @@ -886,14 +830,12 @@ int mutt_index_menu (void) break; case OP_MAIN_FETCH_MAIL: - CHECK_ATTACH; pop_fetch_mail (); menu->redraw = REDRAW_FULL; break; case OP_HELP: - mutt_help (MENU_MAIN); menu->redraw = REDRAW_FULL; break; @@ -914,7 +856,6 @@ int mutt_index_menu (void) case OP_MAIN_LIMIT: case OP_TOGGLE_READ: - CHECK_IN_MAILBOX; menu->oldcurrent = (Context->vcount && menu->current >= 0 && menu->current < @@ -962,14 +903,13 @@ int mutt_index_menu (void) break; case OP_QUIT: - closed = op; if (attach_msg) { done = 1; break; } - if (query_quadoption2(MCore.quit, _("Quit Madmutt?")) == M_YES) { + if (query_quadoption2(mod_core.quit, _("Quit Madmutt?")) == M_YES) { int check; oldcount = Context ? Context->msgcount : 0; @@ -988,8 +928,7 @@ int mutt_index_menu (void) break; case OP_REDRAW: - - clearok (stdscr, TRUE); + clearok (main_w, TRUE); menu->redraw = REDRAW_FULL; break; @@ -997,7 +936,6 @@ int mutt_index_menu (void) case OP_SEARCH_REVERSE: case OP_SEARCH_NEXT: case OP_SEARCH_OPPOSITE: - CHECK_MSGCOUNT; CHECK_VISIBLE; if ((menu->current = mutt_search_command (menu->current, op)) == -1) @@ -1008,7 +946,6 @@ int mutt_index_menu (void) case OP_SORT: case OP_SORT_REVERSE: - if (mutt_select_sort ((op == OP_SORT_REVERSE)) == 0) { if (Context && Context->msgcount) { resort_index (menu); @@ -1018,7 +955,6 @@ int mutt_index_menu (void) break; case OP_TAG: - CHECK_MSGCOUNT; CHECK_VISIBLE; if (tag && !option (OPTAUTOTAG)) { @@ -1042,7 +978,6 @@ int mutt_index_menu (void) break; case OP_MAIN_TAG_PATTERN: - CHECK_MSGCOUNT; CHECK_VISIBLE; mutt_pattern_func (M_TAG, _("Tag messages matching: ")); @@ -1050,7 +985,6 @@ int mutt_index_menu (void) break; case OP_MAIN_UNDELETE_PATTERN: - CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; @@ -1063,7 +997,6 @@ int mutt_index_menu (void) break; case OP_MAIN_UNTAG_PATTERN: - CHECK_MSGCOUNT; CHECK_VISIBLE; if (mutt_pattern_func (M_UNTAG, _("Untag messages matching: ")) == 0) @@ -1080,7 +1013,6 @@ int mutt_index_menu (void) break; case OP_MAIN_SYNC_FOLDER: - if (Context && !Context->msgcount) break; @@ -1137,7 +1069,7 @@ int mutt_index_menu (void) case OP_MAIN_CHANGE_GROUP: case OP_MAIN_CHANGE_GROUP_READONLY: #endif - if (attach_msg || option (OPTREADONLY) || + if (attach_msg || #ifdef USE_NNTP op == OP_MAIN_CHANGE_GROUP_READONLY || #endif @@ -1184,7 +1116,7 @@ int mutt_index_menu (void) break; } if (!buf[0]) { - CLEARLINE (LINES - 1); + CLEARLINE(main_w, LINES - 1); break; } @@ -1239,14 +1171,6 @@ int mutt_index_menu (void) menu->current = 0; sidebar_set_current (buf); -#ifdef USE_NNTP - /* buffy_check() must be done with mail-reader mode! */ - menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_MAIN, - (Context - && (Context->magic == - M_NNTP)) ? IndexNewsHelp : - IndexHelp); -#endif mutt_clear_error (); buffy_check (0); /* force the buffy check after we have changed the folder */ @@ -1275,8 +1199,7 @@ int mutt_index_menu (void) menu->current = mutt_thread_next_unread (Context, CURHDR); } - if (option (OPTPGPAUTODEC) && - (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)) mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); if ((op = mutt_display_message (CURHDR)) == -1) { @@ -1289,7 +1212,6 @@ int mutt_index_menu (void) continue; case OP_EXIT: - closed = op; if (menu->menu == MENU_MAIN && attach_msg) { done = 1; @@ -1297,7 +1219,7 @@ int mutt_index_menu (void) } if ((menu->menu == MENU_MAIN) - && (query_quadoption2(MCore.quit, + && (query_quadoption2(mod_core.quit, _("Exit Madmutt without saving?")) == M_YES)) { if (Context) { @@ -1309,7 +1231,6 @@ int mutt_index_menu (void) break; case OP_EDIT_TYPE: - CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_ATTACH; @@ -1324,7 +1245,6 @@ int mutt_index_menu (void) break; case OP_MAIN_BREAK_THREAD: - CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; @@ -1354,7 +1274,6 @@ int mutt_index_menu (void) break; case OP_MAIN_LINK_THREADS: - CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; @@ -1392,7 +1311,6 @@ int mutt_index_menu (void) break; case OP_MAIN_NEXT_UNDELETED: - CHECK_MSGCOUNT; CHECK_VISIBLE; if (menu->current >= Context->vcount - 1) { @@ -1415,7 +1333,6 @@ int mutt_index_menu (void) break; case OP_NEXT_ENTRY: - CHECK_MSGCOUNT; CHECK_VISIBLE; if (menu->current >= Context->vcount - 1) { @@ -1434,7 +1351,6 @@ int mutt_index_menu (void) break; case OP_MAIN_PREV_UNDELETED: - CHECK_MSGCOUNT; CHECK_VISIBLE; if (menu->current < 1) { @@ -1456,7 +1372,6 @@ int mutt_index_menu (void) break; case OP_PREV_ENTRY: - CHECK_MSGCOUNT; CHECK_VISIBLE; if (menu->current < 1) { @@ -1515,7 +1430,6 @@ int mutt_index_menu (void) case OP_MAIN_PREV_UNREAD: case OP_MAIN_NEXT_NEW_THEN_UNREAD: case OP_MAIN_PREV_NEW_THEN_UNREAD: - { int first_unread = -1; int first_new = -1; @@ -1597,7 +1511,6 @@ int mutt_index_menu (void) break; } case OP_FLAG_MESSAGE: - CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; @@ -1630,7 +1543,6 @@ int mutt_index_menu (void) break; case OP_TOGGLE_NEW: - CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; @@ -1672,7 +1584,6 @@ int mutt_index_menu (void) break; case OP_TOGGLE_WRITE: - CHECK_IN_MAILBOX; if (mx_toggle_write (Context) == 0) menu->redraw |= REDRAW_STATUS; @@ -1682,7 +1593,6 @@ int mutt_index_menu (void) case OP_MAIN_NEXT_SUBTHREAD: case OP_MAIN_PREV_THREAD: case OP_MAIN_PREV_SUBTHREAD: - CHECK_MSGCOUNT; CHECK_VISIBLE; switch (op) { @@ -1720,7 +1630,6 @@ int mutt_index_menu (void) break; case OP_MAIN_PARENT_MESSAGE: - CHECK_MSGCOUNT; CHECK_VISIBLE; @@ -1737,7 +1646,6 @@ int mutt_index_menu (void) case OP_MAIN_SET_FLAG: case OP_MAIN_CLEAR_FLAG: - CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; @@ -1846,7 +1754,6 @@ int mutt_index_menu (void) */ case OP_BOUNCE_MESSAGE: - CHECK_ATTACH; CHECK_MSGCOUNT; CHECK_VISIBLE; @@ -1854,7 +1761,6 @@ int mutt_index_menu (void) break; case OP_CREATE_ALIAS: - mutt_create_alias (Context && Context->vcount ? CURHDR->env : NULL, NULL); MAYBE_REDRAW (menu->redraw); @@ -1869,7 +1775,6 @@ int mutt_index_menu (void) case OP_PURGE_MESSAGE: case OP_DELETE: - CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; @@ -1909,7 +1814,6 @@ int mutt_index_menu (void) case OP_DELETE_THREAD: case OP_DELETE_SUBTHREAD: - CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; @@ -1934,21 +1838,19 @@ int mutt_index_menu (void) case OP_CATCHUP: if (Context && Context->magic == M_NNTP) { if (mutt_newsgroup_catchup (CurrentNewsSrv, - ((NNTP_DATA *) Context->data)->group)) + ((nntp_data_t *) Context->data)->group)) menu->redraw = REDRAW_INDEX | REDRAW_STATUS; } break; #endif case OP_DISPLAY_ADDRESS: - CHECK_MSGCOUNT; CHECK_VISIBLE; mutt_display_address (CURHDR->env); break; case OP_ENTER_COMMAND: - CurrentMenu = MENU_MAIN; mutt_enter_command (); mutt_check_rescore (Context); @@ -1959,7 +1861,6 @@ int mutt_index_menu (void) break; case OP_EDIT_MESSAGE: - CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; @@ -1967,8 +1868,7 @@ int mutt_index_menu (void) CHECK_MX_ACL (Context, ACL_INSERT, _("Editing")); - if (option (OPTPGPAUTODEC) - && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)) mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); mutt_edit_message (Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; @@ -1976,26 +1876,22 @@ int mutt_index_menu (void) break; case OP_FORWARD_MESSAGE: - CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_ATTACH; - if (option (OPTPGPAUTODEC) && - (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)) mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); ci_send_message (SENDFORWARD, NULL, NULL, Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; break; case OP_GROUP_REPLY: - CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_ATTACH; - if (option (OPTPGPAUTODEC) && - (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)) mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); ci_send_message (SENDREPLY | SENDGROUPREPLY, NULL, NULL, Context, @@ -2004,13 +1900,11 @@ int mutt_index_menu (void) break; case OP_LIST_REPLY: - CHECK_ATTACH; CHECK_MSGCOUNT; CHECK_VISIBLE; - if (option (OPTPGPAUTODEC) && - (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)) mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); ci_send_message (SENDREPLY | SENDLISTREPLY, NULL, NULL, Context, @@ -2019,7 +1913,6 @@ int mutt_index_menu (void) break; case OP_MAIL: - CHECK_ATTACH; ci_send_message (0, NULL, NULL, Context, NULL); menu->redraw = REDRAW_FULL; @@ -2046,35 +1939,20 @@ int mutt_index_menu (void) break; case OP_PIPE: - CHECK_MSGCOUNT; CHECK_VISIBLE; mutt_pipe_message (tag ? NULL : CURHDR); - /* in an IMAP folder index with imap_peek=no, piping could change - * * new or old messages status to read. Redraw what's needed. - */ - if (Context->magic == M_IMAP && !option (OPTIMAPPEEK)) { - menu->redraw = (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS; - } MAYBE_REDRAW (menu->redraw); break; case OP_PRINT: - CHECK_MSGCOUNT; CHECK_VISIBLE; mutt_print_message (tag ? NULL : CURHDR); - /* in an IMAP folder index with imap_peek=no, piping could change - * * new or old messages status to read. Redraw what's needed. - */ - if (Context->magic == M_IMAP && !option (OPTIMAPPEEK)) { - menu->redraw = (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS; - } break; case OP_MAIN_READ_THREAD: case OP_MAIN_READ_SUBTHREAD: - CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; @@ -2096,14 +1974,12 @@ int mutt_index_menu (void) 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; @@ -2125,7 +2001,6 @@ int mutt_index_menu (void) 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) { @@ -2138,7 +2013,7 @@ int mutt_index_menu (void) _("Reply by mail as poster prefers?")) != M_YES) { if (Context && Context->magic == M_NNTP - && !((NNTP_DATA *) Context->data)->allowed + && !((nntp_data_t *) Context->data)->allowed && query_quadoption (OPT_TOMODERATED, _ ("Posting to this group not allowed, may be moderated. Continue?")) @@ -2161,13 +2036,11 @@ int mutt_index_menu (void) #endif case OP_REPLY: - CHECK_ATTACH; CHECK_MSGCOUNT; CHECK_VISIBLE; - if (option (OPTPGPAUTODEC) && - (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (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); @@ -2175,14 +2048,12 @@ int mutt_index_menu (void) 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, @@ -2200,7 +2071,6 @@ int mutt_index_menu (void) break; case OP_UNDELETE: - CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; @@ -2227,7 +2097,6 @@ int mutt_index_menu (void) case OP_UNDELETE_THREAD: case OP_UNDELETE_SUBTHREAD: - CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; @@ -2288,6 +2157,7 @@ int mutt_index_menu (void) case OP_SIDEBAR_PREV_NEW: sidebar_scroll (op); break; + default: if (menu->menu == MENU_MAIN) km_error_key (MENU_MAIN);