Subject: [sup-talk] [PATCH] Avoid re-adding the signature when re-editing a draft with edit_signature: true

From: [email-masked] (Nicolas Pouillard)
Date: Mon, 14 Jan 2008 10:00:38 +0100

---
 lib/sup/modes/edit-message-mode.rb |    2 +-
 lib/sup/modes/resume-mode.rb       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb
index f058d03..6a7f273 100644
--- a/lib/sup/modes/edit-message-mode.rb
+++ b/lib/sup/modes/edit-message-mode.rb
@@ -59,7 +59,7 @@ EOS
     @header_lines = []
 
     @body = opts.delete(:body) || []
-    @body += sig_lines if $config[:edit_signature]
+    @body += sig_lines if $config[:edit_signature] && !opts.delete(:have_signature)
 
     if opts[:attachments]
       @attachments = opts[:attachments].values
diff --git a/lib/sup/modes/resume-mode.rb b/lib/sup/modes/resume-mode.rb
index 3470975..b1c69fc 100644
--- a/lib/sup/modes/resume-mode.rb
+++ b/lib/sup/modes/resume-mode.rb
@@ -8,7 +8,7 @@ class ResumeMode < EditMessageMode
     header, body = parse_file m.draft_filename
     header.delete "Date"
 
-    super :header => header, :body => body
+    super :header => header, :body => body, :have_signature => true
   end
 
   def killable?
-- 
1.5.3.1.109.gacd69

---

From: [email-masked] (William Morgan)
Date: Mon, 14 Jan 2008 21:05:58 -0800

Applied straight to master. Thanks!

-- 
William <wmorgan-sup at masanjin.net>