]> granicus.if.org Git - neomutt/commitdiff
fix: status color breaks "mutt -D"
authorPietro Cerutti <gahr@gahr.ch>
Thu, 24 Nov 2016 23:06:53 +0000 (23:06 +0000)
committerRichard Russon <rich@flatcap.org>
Tue, 29 Nov 2016 13:55:20 +0000 (13:55 +0000)
"mutt -D" gets confused when it reads config for the status-color feature.

Let _mutt_parse_color fake a whole-line parsing when dry-running

Fixes: #235
color.c

diff --git a/color.c b/color.c
index e16e29c6f596a11e0c0a62bc2c26d4de16752d79..79b5b3446d9a5a02aa4f503f3310add0a7da14cd 100644 (file)
--- a/color.c
+++ b/color.c
@@ -812,7 +812,11 @@ _mutt_parse_color (BUFFER *buf, BUFFER *s, BUFFER *err,
   
   /* dry run? */
   
-  if(dry_run) return 0;
+  if(dry_run)
+  {
+    *s->dptr = '\0'; /* fake that we're done parsing */
+    return 0;
+  }
 
   
 #ifdef HAVE_COLOR