From 85dea0791cbf6f479c45e280cea7b5376c365498 Mon Sep 17 00:00:00 2001 From: Stefan Assmann Date: Wed, 27 Jun 2018 10:15:05 +0200 Subject: [PATCH] fix mutt_buffy_notify() to properly update BuffyNotify In commit 184244053 doxy: document buffy.c the check for whether to call mutt_buffy_list() was changed from if (mutt_buffy_check(false) && BuffyNotify) to if (BuffyNotify && (mutt_buffy_check(false) != 0)) By reversing the check mutt_buffy_check() never executes when BuffyNotify is zero. However, it is essential to run mutt_buffy_check() before checking BuffyNotify, as mutt_buffy_check() updates BuffyNotify. Therefore return the check to its inital form Fixes #1279 --- buffy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buffy.c b/buffy.c index ea227faeb..4d063c7a8 100644 --- a/buffy.c +++ b/buffy.c @@ -889,7 +889,7 @@ void mutt_buffy_setnotified(const char *path) */ bool mutt_buffy_notify(void) { - if (BuffyNotify && (mutt_buffy_check(false) != 0)) + if (mutt_buffy_check(false) && BuffyNotify) { return mutt_buffy_list(); } -- 2.40.0