From: Richard Russon Date: Fri, 2 Sep 2016 13:33:01 +0000 (+0100) Subject: proposed fix for clearing labels X-Git-Tag: neomutt-20160910~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e9e2c124a30c6d6530cbd0e4539387a26a791e2;p=neomutt proposed fix for clearing labels 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). --- diff --git a/headers.c b/headers.c index 392448821..130b9b27f 100644 --- 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;