]> git.cworth.org Git - sup/commitdiff
added multi_select
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 3 Jan 2007 16:15:52 +0000 (16:15 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 3 Jan 2007 16:15:52 +0000 (16:15 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@156 5c8cc53c-5e98-4d25-b20a-d8db53a31250

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

index 17d9992d818506a181a4b99a9ca24d332c725d9a..a7256f970a44fa95f7a9d0c0b74be124765c4a42 100644 (file)
@@ -42,9 +42,8 @@ class ThreadIndexMode < LineCursorMode
   def [] i; @text[i]; end
 
   ## open up a thread view window
-  def select
-    this_curpos = curpos
-    t = @threads[this_curpos]
+  def select t=nil
+    t ||= @threads[curpos]
 
     ## TODO: don't regen text completely
     Redwood::reporting_thread do
@@ -53,6 +52,10 @@ class ThreadIndexMode < LineCursorMode
       BufferManager.draw_screen
     end
   end
+
+  def multi_select threads
+    threads.each { |t| select t }
+  end
   
   def handle_starred_update m
     return unless(t = @ts.thread_for m)