From 9a49e72cbbf2959b9c6412dc0732fc9e820b7184 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 1 Dec 2017 13:32:38 +0100 Subject: [PATCH] Fixup smart modify-labels-then-hide for !tag case (#975) The code used to automatically handle setting the quasi delete state to whether the message is still visible after performing the change. This was broken for the !tag case in commit 7d151fd0919f6cc7ba9cdc1e7de90697c66dce43 Author: Mehdi Abaakouk Date: Tue Feb 21 10:50:35 2017 +0100 Share label editing between imap/notmuch Which replaced the !still_visible with simply true. --- curs_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/curs_main.c b/curs_main.c index fb31d5dd410..525585fd24a 100644 --- a/curs_main.c +++ b/curs_main.c @@ -1947,7 +1947,12 @@ int mutt_index_menu(void) } if (op == OP_MAIN_MODIFY_TAGS_THEN_HIDE) { - CURHDR->quasi_deleted = true; + bool still_queried = false; +#ifdef USE_NOTMUCH + if (Context->magic == MUTT_NOTMUCH) + still_queried = nm_message_is_still_queried(Context, CURHDR); +#endif + CURHDR->quasi_deleted = !still_queried; Context->changed = true; } if (menu->menu == MENU_PAGER)