OP_MAIN_LAST_MESSAGE "move to the last message"
OP_MAIN_LIMIT "show only messages matching a pattern"
OP_MAIN_LINK_THREADS "link tagged message to the current one"
+OP_MAIN_NEXT_FOLDER "open next folder with new mail"
OP_MAIN_NEXT_NEW "jump to the next new message"
OP_MAIN_NEXT_NEW_THEN_UNREAD "jump to the next new or unread message"
OP_MAIN_NEXT_SUBTHREAD "jump to the next subthread"
break;
case OP_MAIN_CHANGE_FOLDER:
+ case OP_MAIN_NEXT_FOLDER:
if (attach_msg)
op = OP_MAIN_CHANGE_FOLDER_READONLY;
cp = _("Open mailbox");
buf[0] = '\0';
- mutt_buffy (buf, sizeof (buf));
-
- if (mutt_enter_fname (cp, buf, sizeof (buf), &menu->redraw, 1) == -1)
- {
- if (menu->menu == MENU_PAGER)
- {
- op = OP_DISPLAY_MESSAGE;
- continue;
- }
- else
- break;
- }
- if (!buf[0])
+ if ((op == OP_MAIN_NEXT_FOLDER) && Context && Context->path)
{
- CLEARLINE (LINES-1);
- break;
+ strfcpy (buf, Context->path, sizeof (buf));
+ mutt_pretty_mailbox (buf);
+ mutt_buffy (buf, sizeof (buf));
+ if (!buf[0])
+ {
+ mutt_error _("No new messages");
+ break;
+ }
+ }
+ else
+ {
+ mutt_buffy (buf, sizeof (buf));
+
+ if (mutt_enter_fname (cp, buf, sizeof (buf), &menu->redraw, 1) == -1)
+ {
+ if (menu->menu == MENU_PAGER)
+ {
+ op = OP_DISPLAY_MESSAGE;
+ continue;
+ }
+ else
+ break;
+ }
+ if (!buf[0])
+ {
+ CLEARLINE (LINES-1);
+ break;
+ }
}
mutt_expand_path (buf, sizeof (buf));
{ "break-thread", OP_MAIN_BREAK_THREAD, "#" },
{ "change-folder", OP_MAIN_CHANGE_FOLDER, "c" },
{ "change-folder-readonly", OP_MAIN_CHANGE_FOLDER_READONLY, "\033c" },
+ { "next-folder", OP_MAIN_NEXT_FOLDER, "," },
{ "collapse-thread", OP_MAIN_COLLAPSE_THREAD, "\033v" },
{ "collapse-all", OP_MAIN_COLLAPSE_ALL, "\033V" },
{ "copy-message", OP_COPY_MESSAGE, "C" },
{ "bounce-message", OP_BOUNCE_MESSAGE, "b" },
{ "change-folder", OP_MAIN_CHANGE_FOLDER, "c" },
{ "change-folder-readonly", OP_MAIN_CHANGE_FOLDER_READONLY, "\033c" },
+ { "next-folder", OP_MAIN_NEXT_FOLDER, "," },
{ "copy-message", OP_COPY_MESSAGE, "C" },
{ "decode-copy", OP_DECODE_COPY, "\033C" },
{ "delete-message", OP_DELETE, "d" },