]> granicus.if.org Git - neomutt/commitdiff
fix logic
authorRichard Russon <rich@flatcap.org>
Wed, 17 Jan 2018 15:23:07 +0000 (15:23 +0000)
committerRichard Russon <rich@flatcap.org>
Thu, 18 Jan 2018 23:26:52 +0000 (23:26 +0000)
pager.c

diff --git a/pager.c b/pager.c
index 7dc84e008b60537a76a1a1b3d2109e596d9d6e87..3674d5a8669f31236379d182b0f7ca957379f3ec 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -1486,11 +1486,16 @@ static int display_line(FILE *f, LOFF_T *last_pos, struct Line **line_info,
         (*last)--;
       goto out;
     }
-    if (QuoteRegexp && regexec(QuoteRegexp->regex, (char *) fmt, 1, pmatch, 0) != 0)
+    if (QuoteRegexp && regexec(QuoteRegexp->regex, (char *) fmt, 1, pmatch, 0) == 0)
+    {
+      (*line_info)[n].quote =
+          classify_quote(quote_list, (char *) fmt + pmatch[0].rm_so,
+                        pmatch[0].rm_eo - pmatch[0].rm_so, force_redraw, q_level);
+    }
+    else
+    {
       goto out;
-    (*line_info)[n].quote =
-        classify_quote(quote_list, (char *) fmt + pmatch[0].rm_so,
-                       pmatch[0].rm_eo - pmatch[0].rm_so, force_redraw, q_level);
+    }
   }
 
   if ((flags & MUTT_SEARCH) && !(*line_info)[n].continuation &&