Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: nicolas.pouillard@gmail.com (Nicolas Pouillard)
Subject: [sup-talk] [PATCH] Avoid re-adding the signature when re-editing a draft with edit_signature: true
Date: Sun, 13 Jan 2008 15:46:15 +0100	[thread overview]
Message-ID: <1200235575295-git-send-email-nicolas.pouillard@gmail.com> (raw)

---
 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..710d390 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] and not 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


             reply	other threads:[~2008-01-13 14:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-13 14:46 Nicolas Pouillard [this message]
2008-01-14  0:55 ` William Morgan
2008-01-14  0:56   ` William Morgan
2008-01-14  9:01   ` Nicolas Pouillard
2008-01-14  9:00 Nicolas Pouillard
2008-01-15  5:05 ` William Morgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1200235575295-git-send-email-nicolas.pouillard@gmail.com \
    --to=nicolas.pouillard@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox