]> granicus.if.org Git - neomutt/commitdiff
notmuch: use global settings for vfolder-from-query
authorJosh Poimboeuf <jpoimboe@redhat.com>
Thu, 31 May 2018 21:58:02 +0000 (16:58 -0500)
committerRichard Russon <rich@flatcap.org>
Mon, 8 Oct 2018 12:49:05 +0000 (13:49 +0100)
When the <vfolder-from-query> command is run while already in a vfolder,
it takes the current vfolder as context.  That means the global settings
(nm_query_type, nm_db_limit, nm_default_uri) are ignored in favor of the
current vfolder's settings.  This is confusing behavior because the new
vfolder is otherwise independent from the old one.

Set the nm_uri_from_query() context to NULL so that it uses the global
settings instead.

curs_main.c

index 0e1d38b015e8aefacec8820a5dca0ce0e90016d6..8651f63c25454179da9defa20a44315b7b863af7 100644 (file)
@@ -2068,7 +2068,7 @@ int mutt_index_menu(void)
           mutt_message(_("No query, aborting"));
           break;
         }
-        if (!nm_uri_from_query(Context->mailbox, buf, sizeof(buf)))
+        if (!nm_uri_from_query(NULL, buf, sizeof(buf)))
           mutt_message(_("Failed to create query, aborting"));
         else
           main_change_folder(menu, op, buf, sizeof(buf), &oldcount, &index_hint);