]> granicus.if.org Git - neomutt/commitdiff
merge: keywords
authorRichard Russon <rich@flatcap.org>
Thu, 18 Aug 2016 16:47:35 +0000 (17:47 +0100)
committerRichard Russon <rich@flatcap.org>
Thu, 18 Aug 2016 17:22:08 +0000 (18:22 +0100)
 * add ident to PATCHES
 * feature: keywords

20 files changed:
1  2 
OPS
PATCHES
commands.c
curs_main.c
enter.c
functions.h
globals.h
hcache.c
hdrline.c
init.c
init.h
main.c
mh.c
mutt.h
muttlib.c
pager.c
pattern.c
protos.h
sendlib.c
sort.h

diff --cc OPS
Simple merge
diff --cc PATCHES
index a3046a071c66fdda8fe28751556771e66cc3b057,db96a2887567196030e88a07fe7736e3b96d033c..c9f5d3e12edef3ecd4d2d902d7f357f07938b6e9
+++ b/PATCHES
@@@ -1,16 -1,1 +1,17 @@@
 +patch-compress-neomutt
 +patch-cond-date-neomutt
 +patch-fmemopen-neomutt
 +patch-ifdef-neomutt
 +patch-index-color-neomutt
 +patch-initials-neomutt
+ patch-keywords-neomutt
 +patch-limit-current-thread-neomutt
 +patch-lmdb-neomutt
 +patch-nested-if-neomutt
 +patch-new-mail-neomutt
 +patch-progress-neomutt
 +patch-quasi-delete-neomutt
 +patch-skip-quoted-neomutt
 +patch-smime-encrypt-self-neomutt
 +patch-status-color-neomutt
 +patch-tls-sni-neomutt
diff --cc commands.c
Simple merge
diff --cc curs_main.c
Simple merge
diff --cc enter.c
Simple merge
diff --cc functions.h
Simple merge
diff --cc globals.h
Simple merge
diff --cc hcache.c
Simple merge
diff --cc hdrline.c
index 3939c915a3ad3b44ae6cb252d3870444c891b8a7,cab7f6118138a7ff7601969da6daacd1db6f87a4..b6c7a8a1f0e19439f30708137088f2be318a7fbb
+++ b/hdrline.c
@@@ -881,45 -695,57 +881,61 @@@ hdr_format_str (char *dest
  
       case 'y':
         if (optional)
-        optional = hdr->env->x_label ? 1 : 0;
+        optional = hdr->env->labels ? 1 : 0;
  
 -       mutt_format_s (dest, destlen, prefix,
 -                      mutt_labels(NULL, 0, hdr->env, NULL));
 +       colorlen = add_index_color (dest, destlen, flags, MT_COLOR_INDEX_LABEL);
-        mutt_format_s (dest + colorlen, destlen - colorlen, prefix, NONULL (hdr->env->x_label));
++       mutt_format_s (dest + colorlen, destlen - colorlen, prefix, mutt_labels(NULL, 0, hdr->env, NULL));
 +       add_index_color (dest + colorlen, destlen - colorlen, flags, MT_COLOR_INDEX);
         break;
   
      case 'Y':
-       if (hdr->env->x_label)
+       if (hdr->env->labels == NULL)
        {
-       i = 1;  /* reduce reuse recycle */
-       htmp = NULL;
-       if (flags & MUTT_FORMAT_TREE
-           && (hdr->thread->prev && hdr->thread->prev->message
-               && hdr->thread->prev->message->env->x_label))
-         htmp = hdr->thread->prev->message;
-       else if (flags & MUTT_FORMAT_TREE
-                && (hdr->thread->parent && hdr->thread->parent->message
-                    && hdr->thread->parent->message->env->x_label))
-         htmp = hdr->thread->parent->message;
-       if (htmp && mutt_strcasecmp (hdr->env->x_label,
-                                    htmp->env->x_label) == 0)
-         i = 0;
+         if (optional)
+           optional = 0;
+         mutt_format_s(dest, destlen, prefix, "");
+         break;
        }
        else
-       i = 0;
-       if (optional)
-       optional = i;
-       colorlen = add_index_color (dest, destlen, flags, MT_COLOR_INDEX_LABEL);
-       if (i)
-         mutt_format_s (dest + colorlen, destlen - colorlen, prefix, NONULL (hdr->env->x_label));
-       else
-         mutt_format_s (dest + colorlen, destlen - colorlen, prefix, "");
-       add_index_color (dest + colorlen, destlen - colorlen, flags, MT_COLOR_INDEX);
+       {
+         char labels[HUGE_STRING];
+         char labelstmp[HUGE_STRING];
+         i = 1;  /* reduce reuse recycle */
+         htmp = NULL;
+         if ((flags & MUTT_FORMAT_TREE) &&
+             hdr->thread->prev &&
+             hdr->thread->prev->message &&
+             hdr->thread->prev->message->env->labels)
+           htmp = hdr->thread->prev->message;
+         else if ((flags & MUTT_FORMAT_TREE) &&
+                  hdr->thread->parent &&
+                  hdr->thread->parent->message &&
+                  hdr->thread->parent->message->env->labels)
+           htmp = hdr->thread->parent->message;
+         mutt_labels(labels, sizeof(labels), hdr->env, NULL);
+         if (htmp)
+         {
+           mutt_labels(labelstmp, sizeof(labelstmp), htmp->env, NULL);
+           if (htmp && mutt_strcasecmp (labels, labelstmp) == 0)
+             i = 0;
+         }
+         if (optional)
+         optional = i;
++        colorlen = add_index_color (dest, destlen, flags, MT_COLOR_INDEX_LABEL);
+         if (i)
 -          mutt_format_s (dest, destlen, prefix, labels);
++        mutt_format_s (dest + colorlen, destlen - colorlen, prefix, labels);
+         else
 -          mutt_format_s (dest, destlen, prefix, "");
++          mutt_format_s (dest + colorlen, destlen - colorlen, prefix, "");
++        add_index_color (dest + colorlen, destlen - colorlen, flags, MT_COLOR_INDEX);
+       }
  
        break;
  
++
      default:
        snprintf (dest, destlen, "%%%s%c", prefix, op);
        break;
diff --cc init.c
Simple merge
diff --cc init.h
Simple merge
diff --cc main.c
Simple merge
diff --cc mh.c
Simple merge
diff --cc mutt.h
Simple merge
diff --cc muttlib.c
Simple merge
diff --cc pager.c
Simple merge
diff --cc pattern.c
Simple merge
diff --cc protos.h
Simple merge
diff --cc sendlib.c
Simple merge
diff --cc sort.h
index 233e77398b41f8f52fb1951ff3bb4678a0d704e8,372783589a670225d19dead047234145b82703d7..c969c097209e8069fbe820967dad1e694d2390a6
--- 1/sort.h
--- 2/sort.h
+++ b/sort.h
@@@ -35,7 -35,8 +35,9 @@@
  #define SORT_COUNT_NEW        16
  #define SORT_FLAGGED  17
  #define SORT_PATH     18
 -#define SORT_LABEL    19
 +#define SORT_DESC     19
++#define SORT_LABEL    20
  /* dgc: Sort & SortAux are shorts, so I'm bumping these bitflags up from
   * bits 4 & 5 to bits 8 & 9 to make room for more sort keys in the future. */
  #define SORT_MASK     0xff