From: Julian Andres Klode Date: Fri, 1 Dec 2017 12:32:38 +0000 (+0100) Subject: Fixup smart modify-labels-then-hide for !tag case (#975) X-Git-Tag: neomutt-20171208~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a49e72cbbf2959b9c6412dc0732fc9e820b7184;p=neomutt 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. --- diff --git a/curs_main.c b/curs_main.c index fb31d5dd4..525585fd2 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)