]> git.cworth.org Git - sup/commitdiff
collapsing a message now moves the cursor down one line. 'n' and 'p' now also cycle...
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Thu, 4 Jan 2007 17:07:57 +0000 (17:07 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Thu, 4 Jan 2007 17:07:57 +0000 (17:07 +0000)
messages with detailed headers (not just open messages)

git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@175 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/modes/thread-view-mode.rb

index 64a8ef0202d4bb6a2fb5c9430bdac06840537fbf..c641292421475b030d0d683b39a96482639f96d8 100644 (file)
@@ -106,6 +106,7 @@ class ThreadViewMode < LineCursorMode
     case chunk
     when Message, Message::Quote, Message::Signature
       @state[chunk] = (@state[chunk] != :closed ? :closed : :open)
+      cursor_down if @state[chunk] == :closed
     when Message::Attachment
       view_attachment chunk
     end
@@ -164,8 +165,8 @@ class ThreadViewMode < LineCursorMode
     ## otherwise, to the previous message
     top = @messages[m][0]
     if curpos == top
-      while prevm = @messages[m][2]
-        break if @state[prevm] == :open
+      while(prevm = @messages[m][2])
+        break if @state[prevm] != :closed
         m = prevm
       end
       jump_to_message prevm if prevm