X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=thread.c;h=cd9991421444e73a774a3a46d74dfe66debafee5;hp=0f937946f2a1a30d8334ce000e0b66b3122dd4be;hb=a0aa3d4bba449529dfed997214b34e309ce451dd;hpb=bbc4fd52516a8afefbd14c77e34f8389d6f0a6ed diff --git a/thread.c b/thread.c index 0f93794..cd99914 100644 --- a/thread.c +++ b/thread.c @@ -1305,3 +1305,24 @@ int mutt_link_threads (HEADER * cur, HEADER * last, CONTEXT * ctx) return changed; } + +void mutt_adjust_subject (ENVELOPE* e) { + regmatch_t pmatch[1]; + + if (e && e->subject) { + if (regexec (ReplyRegexp.rx, e->subject, 1, pmatch, 0) == 0) + e->real_subj = e->subject + pmatch[0].rm_eo; + else + e->real_subj = e->subject; + } +} + +void mutt_adjust_all_subjects (void) { + int i = 0; + + if (!Context || !Context->msgcount) + return; + + for (i = 0; i < Context->msgcount; i++) + mutt_adjust_subject (Context->hdrs[i]->env); +}