From: Richard Russon Date: Tue, 20 Aug 2019 19:11:54 +0000 (+0100) Subject: refactor pre-processor X-Git-Tag: 2019-10-25~91^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ac5241d9706a4f6b4cfb843621984ca892243b3f;p=neomutt refactor pre-processor --- diff --git a/index.c b/index.c index f306b4cbf..baeaf7309 100644 --- a/index.c +++ b/index.c @@ -698,13 +698,13 @@ static int main_change_folder(struct Menu *menu, int op, struct Mailbox *m, * switch statement would need to be run. */ mutt_folder_hook(buf, m ? m->name : NULL); - const int flags = (C_ReadOnly || (op == OP_MAIN_CHANGE_FOLDER_READONLY) + int flags = MUTT_OPEN_NO_FLAGS; + if (C_ReadOnly || (op == OP_MAIN_CHANGE_FOLDER_READONLY)) + flags = MUTT_READONLY; #ifdef USE_NOTMUCH - || (op == OP_MAIN_VFOLDER_FROM_QUERY_READONLY) + if (op == OP_MAIN_VFOLDER_FROM_QUERY_READONLY) + flags = MUTT_READONLY; #endif - ) ? - MUTT_READONLY : - MUTT_OPEN_NO_FLAGS; bool free_m = false; if (!m)