]> git.notmuchmail.org Git - sup/commitdiff
edit-message-mode bugfix: edit_message_or_header shouldn't do anything on decoration...
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Fri, 14 Dec 2007 00:56:25 +0000 (00:56 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Fri, 14 Dec 2007 00:56:25 +0000 (00:56 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@770 5c8cc53c-5e98-4d25-b20a-d8db53a31250

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

index cdfee01a6431fd0d52281151a0f183a58667caf9..f058d03a817e8a69fec7e9109ca6f2a6ac2f634d 100644 (file)
@@ -105,7 +105,9 @@ EOS
 
   def edit_message_or_field
     lines = DECORATION_LINES + @selectors.size
-    if (curpos - lines) >= @header_lines.length
+    if lines > curpos
+      return
+    elsif (curpos - lines) >= @header_lines.length
       edit_message
     else
       edit_field @header_lines[curpos - lines]