+2009-05-13 14:19 +0200 Rocco Rutte <pdmef@gmx.net> (c46e734a9f9f)
+
+ * mutt.h, muttlib.c: Add mutt_find_list() to lookup data in lists
+
+2009-05-13 12:52 +0200 Rocco Rutte <pdmef@gmx.net> (19e62bd1549b)
+
+ * ChangeLog, alias.c, crypt-gpgme.c, group.c, mbox.c, pgp.c, query.c,
+ rfc822.c, rfc822.h, send.c, smime.c: Prune empty address groups when
+ preparing replies. Closes #2875.
+
2009-05-13 12:21 +0200 Rocco Rutte <pdmef@gmx.net> (ce0e5c895032)
* mbox.c: Actually reopen mbox/mmdf files in case we find
return ci_send_message (SENDRESEND, msg, NULL, ctx, cur);
}
+static int is_reply (HEADER *reply, HEADER *orig)
+{
+ return mutt_find_list (orig->env->references, reply->env->message_id) ||
+ mutt_find_list (orig->env->in_reply_to, reply->env->message_id);
+}
+
int
ci_send_message (int flags, /* send mode */
HEADER *msg, /* template to use for new message */
if (WithCrypto && free_clear_content)
mutt_free_body (&clear_content);
+ /* set 'replied' flag only if the user didn't change/remove
+ In-Reply-To: and References: headers during edit */
if (flags & SENDREPLY)
{
if (cur && ctx)
- mutt_set_flag (ctx, cur, M_REPLIED, 1);
+ mutt_set_flag (ctx, cur, M_REPLIED, is_reply (cur, msg));
else if (!(flags & SENDPOSTPONED) && ctx && ctx->tagged)
{
for (i = 0; i < ctx->vcount; i++)
if (ctx->hdrs[ctx->v2r[i]]->tagged)
- mutt_set_flag (ctx, ctx->hdrs[ctx->v2r[i]], M_REPLIED, 1);
+ mutt_set_flag (ctx, ctx->hdrs[ctx->v2r[i]], M_REPLIED,
+ is_reply (ctx->hdrs[ctx->v2r[i]], msg));
}
}