]> git.notmuchmail.org Git - sup/commitdiff
Avoid re-adding the signature when re-editing a draft with edit_signature: true
authorNicolas Pouillard <nicolas.pouillard@gmail.com>
Mon, 14 Jan 2008 09:00:38 +0000 (10:00 +0100)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Tue, 15 Jan 2008 04:57:35 +0000 (20:57 -0800)
lib/sup/modes/edit-message-mode.rb
lib/sup/modes/resume-mode.rb

index f058d03a817e8a69fec7e9109ca6f2a6ac2f634d..6a7f273b4ec18d59f14919ec10c8c9e6fb9262e6 100644 (file)
@@ -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
index 34709757e049260c0044ad0bac49b6ffc6d86b03..b1c69fc1dc2f35fe1eea2350b21873e6c08470e9 100644 (file)
@@ -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?