FOREVER
{
/* ncurses doesn't return on resized screen when timeout is set to zero */
-#if !defined (USE_SLANG_CURSES) && defined (HAVE_RESIZETERM)
if (menu == MENU_MAIN || menu == MENU_PAGER)
- timeout (menu == MENU_MAIN && Timeout > 0 ? Timeout * 1000 : INT_MAX);
-#else
- if (menu == MENU_MAIN && Timeout > 0)
- timeout (Timeout * 1000); /* milliseconds */
-#endif
+ timeout ((Timeout > 0 ? Timeout : 60) * 1000);
tmp = mutt_getch();
-#if !defined (USE_SLANG_CURSES) && defined (HAVE_RESIZETERM)
if (menu == MENU_MAIN || menu == MENU_PAGER)
-#else
- if (menu == MENU_MAIN && Timeout > 0)
-#endif
timeout (-1); /* restore blocking operation */
LastKey = tmp.ch;
int indicator = indexlen / 3; /* the indicator line of the PI */
int old_PagerIndexLines; /* some people want to resize it
* while inside the pager... */
+ int oldcount = -1;
if (!(flags & M_SHOWCOLOR))
flags |= M_SHOWFLAT;
strcat (helpstr, buffer);
}
+ if (Context)
+ oldcount = Context->msgcount;
+
while (ch != -1)
{
mutt_curs_set (0);
+ if (mutt_buffy_notify () && option (OPTBEEPNEW))
+ beep ();
+ else if (Context && Context->msgcount != oldcount)
+ {
+ if (Context && Context->msgcount > oldcount)
+ {
+ mutt_message (_("New mail in this mailbox."));
+ if (option (OPTBEEPNEW))
+ beep ();
+ redraw |= REDRAW_STATUS;
+ }
+ oldcount = Context->msgcount;
+ }
+
if (redraw & REDRAW_FULL)
{
SETCOLOR (MT_COLOR_NORMAL);
move (statusoffset, COLS-1);
mutt_refresh ();
ch = km_dokey (MENU_PAGER);
- mutt_clear_error ();
+ if (ch != -1)
+ mutt_clear_error ();
mutt_curs_set (1);
if (SigInt)