]> git.cworth.org Git - sup/commitdiff
make dispatch-and-next still dispatch for the final thread in the list
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Sun, 3 Feb 2008 04:01:57 +0000 (20:01 -0800)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Sun, 3 Feb 2008 04:01:57 +0000 (20:01 -0800)
lib/sup/modes/thread-index-mode.rb

index 0809d54b0b7a7346ce0415746b05050b376cca96..cdc0b7306275bd121970fc54c6c491c7be555982 100644 (file)
@@ -117,9 +117,13 @@ EOS
         set_cursor_pos l + 1 # move out of mutex?
         @threads[l + 1]
       end
-    end or return
+    end
 
-    select t, b
+    if t # there's a next thread
+      select t, b
+    elsif b # no next thread. call the block anyways
+      b.call
+    end
   end
   
   def handle_single_message_labeled_update sender, m