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

diff --git a/init.c b/init.c
index e10db7cf1ad1f9c5adbb07e4140e4b6a91db55f4..b4ec94dda58fbcd32dc2c6bc46b5d44c2a4378b9 100644 (file)
--- a/init.c
+++ b/init.c
@@ -412,11 +412,12 @@ int mutt_option_set(const struct Option *val, struct Buffer *err)
               struct Envelope *e = Context->hdrs[i]->env;
               if (e && e->subject)
               {
-                e->real_subj =
-                    (ReplyRegexp &&
-                     (regexec(ReplyRegexp->regex, e->subject, 1, pmatch, 0))) ?
-                        e->subject :
-                        e->subject + pmatch[0].rm_eo;
+                e->real_subj = e->subject;
+                if (ReplyRegexp &&
+                    (regexec(ReplyRegexp->regex, e->subject, 1, pmatch, 0) == 0))
+                {
+                  e->subject += pmatch[0].rm_eo;
+                }
               }
             }
           }