commit 1c44313f39382edda2d7389c2eea60d69e703e32
parent f4adc029a972c56d22def1e903dae7d7be89e0b0
Author: William Morgan <w@masanjin.net>
Date: Sat, 31 May 2008 17:04:58 +0000
bugfix: edit-as-new now preserves reply-to and references
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/sup/modes/compose-mode.rb b/lib/sup/modes/compose-mode.rb
@@ -9,6 +9,8 @@ class ComposeMode < EditMessageMode
header["Cc"] = opts[:cc].map { |p| p.full_address }.join(", ") if opts[:cc]
header["Bcc"] = opts[:bcc].map { |p| p.full_address }.join(", ") if opts[:bcc]
header["Subject"] = opts[:subj] if opts[:subj]
+ header["References"] = opts[:refs].map { |r| "<#{r}>" }.join(" ") if opts[:refs]
+ header["In-Reply-To"] = opts[:replytos].map { |r| "<#{r}>" }.join(" ") if opts[:replytos]
super :header => header, :body => (opts[:body] || [])
end
diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
@@ -250,7 +250,7 @@ EOS
def edit_as_new
m = @message_lines[curpos] or return
- mode = ComposeMode.new(:body => m.quotable_body_lines, :to => m.to, :cc => m.cc, :subj => m.subj, :bcc => m.bcc)
+ mode = ComposeMode.new(:body => m.quotable_body_lines, :to => m.to, :cc => m.cc, :subj => m.subj, :bcc => m.bcc, :refs => m.refs, :replytos => m.replytos)
BufferManager.spawn "edit as new", mode
mode.edit_message
end