sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit b0028987c0b2bd81729d93b2e2a477970f66084a
parent 9509e8193c1989830ced8b22b9866a21f42c7a0e
Author: William Morgan <wmorgan-sup@masanjin.net>
Date:   Tue,  8 Jan 2008 08:56:13 -0800

bugfix in reply-to-all
the "all" option was still showing up even when it wasn't diffferent from
the "sender" option.

Diffstat:
M lib/sup/modes/reply-mode.rb | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb
@@ -29,7 +29,7 @@ class ReplyMode < EditMessageMode
         AccountManager.default_account
       end
 
-    ## now, determine to: and cc: addressess. we  ignore reply-to for list
+    ## now, determine to: and cc: addressess. we ignore reply-to for list
     ## messages because it's typically set to the list address, which we
     ## explicitly treat with reply type :list
     to = @m.is_list_message? ? @m.from : (@m.replyto || @m.from)
@@ -56,10 +56,11 @@ class ReplyMode < EditMessageMode
 
     @headers[:user] = {}
 
+    not_me_ccs = cc.select { |p| !AccountManager.is_account?(p) }
     @headers[:all] = {
       "To" => [to.full_address],
-      "Cc" => cc.select { |p| !AccountManager.is_account?(p) }.map { |p| p.full_address },
-    } unless cc.empty?
+      "Cc" => not_me_ccs.map { |p| p.full_address },
+    } unless not_me_ccs.empty?
 
     @headers[:list] = {
       "To" => [@m.list_address.full_address],