]> git.notmuchmail.org Git - sup/commitdiff
prevent accidentally discarding edited messages
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sat, 10 Feb 2007 18:26:49 +0000 (18:26 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sat, 10 Feb 2007 18:26:49 +0000 (18:26 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@314 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/modes/edit-message-mode.rb

index 2f6563f7201dadd3669893bf4a10c7fde189fe60..6ad1097b3eabd30c2816c776e54f7e8b4ad67772 100644 (file)
@@ -41,6 +41,10 @@ class EditMessageMode < LineCursorMode
     update
   end
 
+  def killable?
+    !@edited || BufferManager.ask_yes_or_no("Discard message?")
+  end
+
 protected
 
   def gen_message_id