]> granicus.if.org Git - neomutt/commitdiff
browser tweak
authorIan Zimmerman <itz@primate.net>
Sun, 4 Jun 2017 17:08:24 +0000 (18:08 +0100)
committerRichard Russon <rich@flatcap.org>
Sun, 2 Jul 2017 21:37:21 +0000 (22:37 +0100)
See issue #609

browser.c
curs_lib.c
doc/Muttrc.head

index 55fc720338ed06c628324750fc441153cca1486c..92c5c42ab2b140a17f75bef356b6f1dc87f96300 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -787,12 +787,12 @@ static int examine_mailboxes(struct Menu *menu, struct BrowserState *state)
   {
     struct Buffy *tmp = Incoming;
 
+    init_state(state, menu);
+
     if (!Incoming)
       return -1;
     mutt_buffy_check(false);
 
-    init_state(state, menu);
-
     do
     {
       if (Context && (mutt_strcmp(tmp->realpath, Context->realpath) == 0))
@@ -1248,8 +1248,7 @@ void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numf
 #endif
       if (buffy)
   {
-    if (examine_mailboxes(NULL, &state) == -1)
-      goto bail;
+    examine_mailboxes (NULL, &state);
   }
   else
 #ifdef USE_IMAP
@@ -1809,8 +1808,7 @@ void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numf
 
         if (buffy)
         {
-          if (examine_mailboxes(menu, &state) == -1)
-            goto bail;
+               examine_mailboxes (menu, &state);
         }
 #ifdef USE_IMAP
         else if (mx_is_imap(LastDir))
index a12710322b443f6cb88eb7c0df09a3c9cd5d7fd1..f6ca4de6f332f69276cf97e58aef678d8570295c 100644 (file)
@@ -900,10 +900,12 @@ int _mutt_enter_fname(const char *prompt, char *buf, size_t blen, int buffy,
   {
     mutt_refresh();
     buf[0] = 0;
-    if (!flags)
-      flags = MUTT_SEL_FOLDER | (multiple ? MUTT_SEL_MULTI : 0);
-
-    _mutt_select_file(buf, blen, flags, files, numfiles);
+    flags = MUTT_SEL_FOLDER;
+    if (multiple)
+      flags |= MUTT_SEL_MULTI;
+    if (buffy)
+      flags |= MUTT_SEL_BUFFY;
+    _mutt_select_file (buf, blen, flags, files, numfiles);
   }
   else
   {
index c09a19bc13b462313ac12337b194c3f4aa908e0e..095cdc7e3b4f4d2e524fb7f4daeadcbff7a347ef 100644 (file)
@@ -26,7 +26,7 @@ macro index,pager,attach,compose \cb "\
 macro generic,pager <F1> "<shell-escape> less @docdir@/manual.txt<Enter>" "show Mutt documentation"
 
 # show the incoming mailboxes list (just like "mutt -y") and back when pressing "y"
-macro index,pager y "<change-folder>?<toggle-mailboxes>" "show incoming mailboxes list"
+macro index,pager y "<change-folder>?" "show incoming mailboxes list"
 bind browser y exit
 
 # Handler for gzip compressed mailboxes