From 40611ac05f5b1e8efbb6f86fe6f6576f9ad4a1a3 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Wed, 17 Jan 2018 15:13:25 +0000 Subject: [PATCH] tidy logic --- init.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/init.c b/init.c index e10db7cf1..b4ec94dda 100644 --- 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; + } } } } -- 2.49.0