From: Josh Poimboeuf Date: Thu, 31 May 2018 21:58:02 +0000 (-0500) Subject: notmuch: use global settings for vfolder-from-query X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43f0dfd2585bf2384df95d184f06778e179b4dff;p=neomutt notmuch: use global settings for vfolder-from-query When the 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. --- diff --git a/curs_main.c b/curs_main.c index 0e1d38b01..8651f63c2 100644 --- a/curs_main.c +++ b/curs_main.c @@ -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);