1 From: Evgeni Golov <sargentd@die-welt.net>
4 When using IMAP and imap_check_subscribed, the server reports the
5 dirs in a random order.
6 This patch introduces a new option, sidebar_sort. Which, when it is
7 set, sorts the dirs in the sidebar alphabetically.
9 I hope, it's usefull for someone ;)
11 PS: This has to be applied ontop of my sidebar-dotted patch, but it
12 should be easy to adopt it to a vanilla mutt.
17 for ( ; tmp->next != 0; tmp = tmp->next )
18 tmp->next->prev = tmp;
20 + if (option(OPTSIDEBARSORT)) {
25 + while (needsort==1) {
28 + for ( ; tmp ; tmp=tmp->next ) {
29 + if (tmp->next != NULL && strcoll(tmp->path, tmp->next->path) > 0) {
49 if ( TopBuffy == 0 && BottomBuffy == 0 )
51 if ( BottomBuffy == 0 ) {
54 @@ -1986,6 +1986,11 @@
56 ** Should the sidebar shorten the path showed.
58 + { "sidebar_sort", DT_BOOL, R_BOTH, OPTSIDEBARSORT, 0 },
61 + ** Should the sidebar be sorted.
63 { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0},
76 --- a/debian/extra/samples/sidebar.muttrc
77 +++ b/debian/extra/samples/sidebar.muttrc
79 # When using IMAP, a '.' is often used as a separator. This option
80 # allows to shorten the folder name to the part after the last dot.
82 +# sidebar_sort (boolean)
83 +# Sorts the folders in the sidebar alphabetically.
85 # color sidebar_new [fg] [bg]
86 # The foreground (fg) and background (bg) color of folders that contain new