From: Pietro Cerutti Date: Tue, 29 May 2018 12:05:10 +0000 (+0100) Subject: Don't let info messages reset error messages' timeouts (#1234) X-Git-Tag: neomutt-20180622~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=195301738b595f414704edbff0acb0e5e3e015b5;p=neomutt Don't let info messages reset error messages' timeouts (#1234) Issue #1100 --- diff --git a/curs_main.c b/curs_main.c index f3a63f460..2857a3492 100644 --- a/curs_main.c +++ b/curs_main.c @@ -2391,6 +2391,7 @@ int mutt_index_menu(void) CHECK_MSGCOUNT; CHECK_VISIBLE; + const int saved_current = menu->current; i = menu->current; menu->current = -1; for (j = 0; j != Context->vcount; j++) @@ -2400,7 +2401,6 @@ int mutt_index_menu(void) i++; if (i > Context->vcount - 1) { - mutt_message(_("Search wrapped to top.")); i = 0; } } @@ -2409,7 +2409,6 @@ int mutt_index_menu(void) i--; if (i < 0) { - mutt_message(_("Search wrapped to bottom.")); i = Context->vcount - 1; } } @@ -2463,8 +2462,22 @@ int mutt_index_menu(void) else mutt_error(_("No unread messages.")); } + break; } - else if (menu->menu == MENU_PAGER) + + if (op == OP_MAIN_NEXT_NEW || op == OP_MAIN_NEXT_UNREAD || op == OP_MAIN_NEXT_NEW_THEN_UNREAD) + { + if (saved_current > menu->current) + { + mutt_message(_("Search wrapped to top.")); + } + } + else if (saved_current < menu->current) + { + mutt_message(_("Search wrapped to bottom.")); + } + + if (menu->menu == MENU_PAGER) { op = OP_DISPLAY_MESSAGE; continue;