]> granicus.if.org Git - mutt/commitdiff
When composing a reply, there might be degenerate cases in which a
authorThomas Roessler <roessler@does-not-exist.org>
Thu, 22 Sep 2005 09:06:13 +0000 (09:06 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Thu, 22 Sep 2005 09:06:13 +0000 (09:06 +0000)
CC header is created, but no To header.  In this case, we now use
the auto-generated CC header as the To header.

send.c

diff --git a/send.c b/send.c
index 5d7363ed1ca0c47d3fa29c89e3f28195aff9840c..84e395e814ac745bc4409dbb027ba7905c339253 100644 (file)
--- a/send.c
+++ b/send.c
@@ -589,6 +589,12 @@ void mutt_fix_reply_recipients (ENVELOPE *env)
   env->to = mutt_remove_duplicates (env->to);
   env->cc = mutt_remove_duplicates (env->cc);
   env->cc = mutt_remove_xrefs (env->to, env->cc);
+  
+  if (env->cc && !env->to)
+  {
+    env->to = env->cc;
+    env->cc = NULL;
+  }
 }
 
 void mutt_make_forward_subject (ENVELOPE *env, CONTEXT *ctx, HEADER *cur)