Commit 610c6b0a authored by Kevin J. McCarthy's avatar Kevin J. McCarthy

Add $change_folder_next option to control mailbox suggestion order.

This patch is out of the Gentoo package maintained by Fabian Groffen.
From the link below, it appears the original author was Simon Burge.

I made some minor changes to get it to apply correctly, and cleaned up
the documentation a bit.

Original patch description:
This patch brings back the original behaviour of change-folder, which
some people find more useful.  It suggests the next folder in your
mailboxes list that has new mail measured from the current folder,
instead of the first folder from your mailboxes list in any case.  This
prevents starvation of folders defined at the back of your list ;)
See discussion: http://thread.gmane.org/gmane.mail.mutt.devel/12457
parent 11a10487
......@@ -1213,6 +1213,11 @@ int mutt_index_menu (void)
#endif
else
{
if (option (OPTCHANGEFOLDERNEXT) && Context && Context->path)
{
strfcpy (buf, Context->path, sizeof (buf));
mutt_pretty_mailbox (buf, sizeof (buf));
}
mutt_buffy (buf, sizeof (buf));
if (mutt_enter_fname (cp, buf, sizeof (buf), 1) == -1)
......
......@@ -361,6 +361,13 @@ struct option_t MuttVars[] = {
**
*/
#endif
{ "change_folder_next", DT_BOOL, R_NONE, OPTCHANGEFOLDERNEXT, 0 },
/*
** .pp
** When this variable is \fIset\fP, the \fC<change-folder>\fP function
** mailbox suggestion will start at the next folder in your ``$mailboxes''
** list, instead of starting at the first folder in the list.
*/
{ "charset", DT_STR, R_NONE, UL &Charset, UL 0 },
/*
** .pp
......
......@@ -355,6 +355,7 @@ enum
OPTBEEP,
OPTBEEPNEW,
OPTBOUNCEDELIVERED,
OPTCHANGEFOLDERNEXT,
OPTBRAILLEFRIENDLY,
OPTCHECKMBOXSIZE,
OPTCHECKNEW,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment