]> granicus.if.org Git - neomutt/commitdiff
Fix toggle-read
authorPietro Cerutti <gahr@gahr.ch>
Tue, 15 May 2018 12:07:13 +0000 (12:07 +0000)
committerRichard Russon <rich@flatcap.org>
Tue, 15 May 2018 14:27:54 +0000 (15:27 +0100)
Issue #1198

curs_main.c
options.h

index 3012c18bd469faecc576ae4680901cae4bfd3df0..7fe8cb6534da99e6b4fdc0b2927296e5550bd109 100644 (file)
@@ -1445,20 +1445,20 @@ int mutt_index_menu(void)
           {
             snprintf(buf2, sizeof(buf2), "!~R!~D~s%s",
                      Context->pattern ? Context->pattern : ".*");
-            OptHideRead = true;
           }
           else
           {
             mutt_str_strfcpy(buf2, Context->pattern + 8, sizeof(buf2));
             if (!*buf2 || (strncmp(buf2, ".*", 2) == 0))
               snprintf(buf2, sizeof(buf2), "~A");
-            OptHideRead = false;
           }
           FREE(&Context->pattern);
           Context->pattern = mutt_str_strdup(buf2);
+          mutt_pattern_func(MUTT_LIMIT, NULL);
         }
 
         if (((op == OP_LIMIT_CURRENT_THREAD) && mutt_limit_current_thread(CURHDR)) ||
+            (op == OP_TOGGLE_READ) ||
             ((op == OP_MAIN_LIMIT) &&
              (mutt_pattern_func(MUTT_LIMIT,
                                 _("Limit to messages matching: ")) == 0)))
index 41c4f116c9985d0fc56096e293f940d9aa7ba01d..6b10f1dd95a2dbffab362adba1199e2ad8e2a053 100644 (file)
--- a/options.h
+++ b/options.h
@@ -32,7 +32,6 @@ WHERE bool OptAttachMsg;           /**< (pseudo) used by attach-message */
 WHERE bool OptAuxSort;             /**< (pseudo) using auxiliary sort function */
 WHERE bool OptDontHandlePgpKeys; /**< (pseudo) used to extract PGP keys */
 WHERE bool OptForceRefresh;        /**< (pseudo) refresh even during macros */
-WHERE bool OptHideRead;            /**< (pseudo) whether or not hide read messages */
 WHERE bool OptIgnoreMacroEvents;  /**< (pseudo) don't process macro/push/exec events while set */
 WHERE bool OptKeepQuiet;           /**< (pseudo) shut up the message and refresh functions while we are executing an external program.  */
 WHERE bool OptMenuCaller;          /**< (pseudo) tell menu to give caller a take */