Commit 69959820 authored by Kevin J. McCarthy's avatar Kevin J. McCarthy

Add $browser_abbreviate_mailboxes.

This allows '=' and '~' mailboxes shortcuts to be turned off in the
browser mailbox list.

The default $sort_browser value of "alpha" uses strcoll(3), which
ignores some punctuation.  When using multiple accounts with
dynamically changing values of $folder, this can lead to an
unintuitive sorting order.  (See issue #22 for an example.)

This problem came about because of commit 8328ce68, which enabled
mutt_pretty_mailbox() calls for IMAP and POP mailboxes too.  The
commit had a valid point about consistency and too-wide mailbox
listings, so I don't really want to revert it.

This option provides an alternative to completely enable/disable the
shortcuts for those who run into an issue.
parent 4e4574c4
Pipeline #20794178 passed with stages
in 13 minutes and 50 seconds
......@@ -495,6 +495,7 @@ static int examine_mailboxes (MUTTMENU *menu, struct browser_state *state)
}
strfcpy (buffer, NONULL (tmp->path), sizeof (buffer));
if (option (OPTBROWSERABBRMAILBOXES))
mutt_pretty_mailbox (buffer, sizeof (buffer));
#ifdef USE_IMAP
......
......@@ -359,6 +359,19 @@ struct option_t MuttVars[] = {
** follow these menus. The option is \fIunset\fP by default because many
** visual terminals don't permit making the cursor invisible.
*/
{ "browser_abbreviate_mailboxes", DT_BOOL, R_NONE, OPTBROWSERABBRMAILBOXES, 1 },
/*
** .pp
** When this variable is \fIset\fP, mutt will abbreviate mailbox
** names in the browser mailbox list, using '~' and '='
** shortcuts.
** .pp
** The default \fC"alpha"\fP setting of $$sort_browser uses
** locale-based sorting (using \fCstrcoll(3)\fP), which ignores some
** punctuation. This can lead to some situations where the order
** doesn't make intuitive sense. In those cases, it may be
** desirable to \fIunset\fP this variable.
*/
#if defined(USE_SSL)
{ "certificate_file", DT_PATH, R_NONE, UL &SslCertFile, UL "~/.mutt_certificates" },
/*
......
......@@ -358,6 +358,7 @@ enum
OPTBOUNCEDELIVERED,
OPTCHANGEFOLDERNEXT,
OPTBRAILLEFRIENDLY,
OPTBROWSERABBRMAILBOXES,
OPTCHECKMBOXSIZE,
OPTCHECKNEW,
OPTCOLLAPSEUNREAD,
......
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