]> granicus.if.org Git - neomutt/commitdiff
proposed fix for clearing labels
authorRichard Russon <rich@flatcap.org>
Fri, 2 Sep 2016 13:33:01 +0000 (14:33 +0100)
committerRichard Russon <rich@flatcap.org>
Sat, 10 Sep 2016 11:05:35 +0000 (12:05 +0100)
Debian bug #832971 -- The use claimed he couldn't reset labels.
I couldn't repeat the problem using his config.  He offered a patch that
he claimed fixed his problem.  Only one part of the patch actually did
anything (and only in a section of code dealing with SETTING labels).

headers.c

index 39244882173f44becbd23318a4bd034f4ecb9b25..130b9b27f5dbad54236f9f1a993ec7c5a456e541 100644 (file)
--- a/headers.c
+++ b/headers.c
@@ -283,9 +283,7 @@ static int label_message(HEADER *hdr, char *new)
     mutt_free_list(&hdr->env->labels);
   }
 
-  if (new == NULL)
-    hdr->env->labels = NULL;
-  else
+  if ((new != NULL) && (*new != '\0'))
   {
     char *last, *label;