X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-ui%2Fcurs_main.c;h=f9e7c33901be1407f4e241f0ebb606bb7b2c84e0;hb=e518a71f587454ec71cbdd6b37246f77235d4143;hp=ddb5be50334669a4c19102789a8aaab84f3992a4;hpb=3433b743b81494973ff59ab796ce2bce63469d19;p=apps%2Fmadmutt.git diff --git a/lib-ui/curs_main.c b/lib-ui/curs_main.c index ddb5be5..f9e7c33 100644 --- a/lib-ui/curs_main.c +++ b/lib-ui/curs_main.c @@ -22,6 +22,7 @@ #include "menu.h" #include "mutt.h" +#include "pattern.h" #include "alias.h" #include "sort.h" #include "recvattach.h" @@ -385,7 +386,7 @@ struct mapping_t IndexNewsHelp[] = { */ int mutt_index_menu (void) { - char buf[LONG_STRING], helpstr[SHORT_STRING]; + char buf[LONG_STRING], helpstr[STRING]; int flags; int op = OP_NULL; int done = 0; /* controls when to exit the "event" loop */ @@ -924,15 +925,14 @@ int mutt_index_menu (void) if (op == OP_TOGGLE_READ) { char buffer[LONG_STRING]; - if (!Context->pattern - || strncmp (Context->pattern, "!~R!~D~s", 8) != 0) { + if (m_strncmp (Context->pattern, "!~R!~D~s", 8) != 0) { snprintf (buffer, sizeof (buffer), "!~R!~D~s%s", Context->pattern ? Context->pattern : ".*"); set_option (OPTHIDEREAD); } else { m_strcpy(buf, sizeof(buf), Context->pattern + 8); - if (!*buf || strncmp (buf, ".*", 2) == 0) + if (m_strncmp (buf, ".*", 2) == 0) snprintf (buf, sizeof (buf), "~A"); unset_option (OPTHIDEREAD); } @@ -2316,9 +2316,6 @@ int mutt_index_menu (void) if (menu->menu == MENU_PAGER) { menu->menu = MENU_MAIN; menu->redraw = REDRAW_FULL; -#if 0 - set_option (OPTWEED); /* turn header weeding back on. */ -#endif } if (done)