From: Richard Russon Date: Wed, 17 Jan 2018 15:13:25 +0000 (+0000) Subject: tidy logic X-Git-Tag: neomutt-20180223~41^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=40611ac05f5b1e8efbb6f86fe6f6576f9ad4a1a3;p=neomutt tidy logic --- 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; + } } } }