ports/mail/mutt/files/patch-browser.c
Adam Weinberger da35507d98 - Update to 1.7.1
- Move some vars around to make portlint happy
- Use MUTT_LITE instead of LITE
- Fetch deepif and date-contitional from remote locations
- Reword COMMENT
- Bring back remote patch versions incase mutt version and patch
  versions arn't in sync
- Remove date_conditional patch pulled in remotely
- Add two new sidebar samples
- convert patch-* patches to makepatch patches
- Greeting patch 1.7.1 now PATCHFILE
- make makesum will pull all optional dist/patchfiles

PR:		213431
Submitted by:	maintainer (dereks lifeofadishwasher com)
2016-10-17 02:40:41 +00:00

41 lines
1.3 KiB
C

--- browser.c.orig 2016-10-08 19:35:50 UTC
+++ browser.c
@@ -80,6 +80,12 @@ static int browser_compare_subject (cons
struct folder_file *pa = (struct folder_file *) a;
struct folder_file *pb = (struct folder_file *) b;
+ /* Always keep '..' in first menu position */
+ if (!strncmp(pa->name, "..", 2))
+ return(-1);
+ if (!strncmp(pb->name, "..", 2))
+ return(1);
+
int r = mutt_strcoll (pa->name, pb->name);
return ((BrowserSort & SORT_REVERSE) ? -r : r);
@@ -90,6 +96,12 @@ static int browser_compare_date (const v
struct folder_file *pa = (struct folder_file *) a;
struct folder_file *pb = (struct folder_file *) b;
+ /* Always keep '..' in first menu position */
+ if (!strncmp(pa->name, "..", 2))
+ return(-1);
+ if (!strncmp(pb->name, "..", 2))
+ return(1);
+
int r = pa->mtime - pb->mtime;
return ((BrowserSort & SORT_REVERSE) ? -r : r);
@@ -100,6 +112,12 @@ static int browser_compare_size (const v
struct folder_file *pa = (struct folder_file *) a;
struct folder_file *pb = (struct folder_file *) b;
+ /* Always keep '..' in first menu position */
+ if (!strncmp(pa->name, "..", 2))
+ return(-1);
+ if (!strncmp(pb->name, "..", 2))
+ return(1);
+
int r = pa->size - pb->size;
return ((BrowserSort & SORT_REVERSE) ? -r : r);