From: Austin Ray Date: Thu, 5 Jul 2018 03:32:23 +0000 (-0400) Subject: Do not interrupt switch fallthrough X-Git-Tag: neomutt-20180716~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=refs%2Fpull%2F1285%2Fhead;p=neomutt Do not interrupt switch fallthrough Commit e85c735 introduced the `` function, designated by `OP_CHECK_STATS`. This had been inserted below `OP_MAIN_CHANGE_VFOLDER`, which is `change-vfolder`'s designation; however, `OP_MAIN_CHANGE_VFOLDER` relies on C's switch fallthrough logic to execute. As a result, `change-vfolder` executed `check-stats`'s logic instead of the correct logic. This commit moves `OP_CHECK_STATS` to above the #ifdef that `OP_MAIN_CHANGE_VFOLDER` is defined in. --- diff --git a/curs_main.c b/curs_main.c index 1a2ccbb12..e2fc119d8 100644 --- a/curs_main.c +++ b/curs_main.c @@ -1905,6 +1905,10 @@ int mutt_index_menu(void) break; } + case OP_CHECK_STATS: + mutt_check_stats(); + break; + #ifdef USE_NOTMUCH case OP_MAIN_VFOLDER_FROM_QUERY: buf[0] = '\0'; @@ -1964,10 +1968,6 @@ int mutt_index_menu(void) case OP_MAIN_CHANGE_VFOLDER: #endif - case OP_CHECK_STATS: - mutt_check_stats(); - break; - #ifdef USE_SIDEBAR case OP_SIDEBAR_OPEN: #endif