]> git.cworth.org Git - sup/commitdiff
abort message composition if the file is unedited
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 11 Jul 2007 19:31:52 +0000 (19:31 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 11 Jul 2007 19:31:52 +0000 (19:31 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@497 5c8cc53c-5e98-4d25-b20a-d8db53a31250

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

index 9d9e2f8e74b50fb3b5abd43c38ebc074a14b5bf3..87fce0e23eed1924d54ddccd46e0c711127bc7a3 100644 (file)
@@ -56,6 +56,8 @@ class EditMessageMode < LineCursorMode
     BufferManager.shell_out "#{editor} #{@file.path}"
     @edited = true if File.mtime(@file.path) > mtime
 
+    BufferManager.kill_buffer self.buffer unless @edited
+
     header, @body = parse_file @file.path
     @header = header - NON_EDITABLE_HEADERS
     handle_new_text @header, @body