X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=curs_main.c;h=1e50716a25e329ae450787f7b40895977a578a51;hp=23604afd53e8da0edc9bfccb70b12bc603cf9c63;hb=4b31579af880a5442699fb93f30e0b3127d37c57;hpb=3d63d943a486f83c09b4c5ab45e2ba8ec6b99cde diff --git a/curs_main.c b/curs_main.c index 23604af..1e50716 100644 --- a/curs_main.c +++ b/curs_main.c @@ -195,7 +195,7 @@ int index_color (int index_no) { HEADER *h = Context->hdrs[Context->v2r[index_no]]; - if (h->pair) + if (h && h->pair) return h->pair; mutt_set_header_color (Context, h); @@ -479,8 +479,12 @@ int mutt_index_menu (void) #endif IndexHelp); - if (!attach_msg) + if (!attach_msg) { mutt_buffy_check(1); /* force the buffy check after we enter the folder */ + /* record folder we open to place sidebar indicator properly */ + if (Context && Context->path) + set_curbuffy(Context->path); + } FOREVER { @@ -1066,7 +1070,7 @@ CHECK_IMAP_ACL(IMAP_ACL_DELETE); break; } - if (query_quadoption (OPT_QUIT, _("Quit Mutt?")) == M_YES) + if (query_quadoption (OPT_QUIT, _("Quit Mutt-ng?")) == M_YES) { int check; @@ -1277,7 +1281,11 @@ CHECK_IMAP_ACL(IMAP_ACL_DELETE); } else #endif - mutt_buffy (buf, sizeof (buf)); + { + if (Context && Context->path) + strncpy (buf, Context->path, sizeof (buf)); + mutt_buffy (buf, sizeof (buf)); + } if ( op == OP_SIDEBAR_OPEN ) { if(!CurBuffy) @@ -1306,6 +1314,7 @@ CHECK_IMAP_ACL(IMAP_ACL_DELETE); mutt_error (_("%s is not a mailbox."), buf); break; } + mutt_str_replace (&CurrentFolder, buf); if (Context) { @@ -1439,11 +1448,6 @@ CHECK_IMAP_ACL(IMAP_ACL_DELETE); if ((Sort & SORT_MASK) != SORT_THREADS) mutt_error _("Threading is not enabled."); - -#if defined (USE_IMAP) && ! defined (IMAP_EDIT_THREADS) - else if (Context->magic == M_IMAP) - mutt_error _("Compile Mutt with --enable-imap-edit-threads for break-thread support"); -#endif else { { @@ -1475,12 +1479,6 @@ CHECK_IMAP_ACL(IMAP_ACL_DELETE); if ((Sort & SORT_MASK) != SORT_THREADS) mutt_error _("Threading is not enabled."); - -#if defined (USE_IMAP) && ! defined (IMAP_EDIT_THREADS) - else if (Context->magic == M_IMAP) - mutt_error _("Compile Mutt with --enable-imap-edit-threads for link-threads support"); -#endif - else if (!CURHDR->env->message_id) mutt_error _("No Message-ID: header available to link thread"); else if (!tag && (!Context->last_tag || !Context->last_tag->tagged)) @@ -2326,7 +2324,11 @@ CHECK_IMAP_ACL(IMAP_ACL_SEEN); case OP_FORWARD_TO_GROUP: CHECK_ATTACH; - if (op != OP_FOLLOWUP || !CURHDR->env->followup_to || + 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 || mutt_strcasecmp (CURHDR->env->followup_to, "poster") || query_quadoption (OPT_FOLLOWUPTOPOSTER,_("Reply by mail as poster prefers?")) != M_YES) {