sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 86bc6c9b7004b9299f92242afc52ba0712dbc8d5
parent 7ed4f7d2c5b837eca606ee756e2086b146ccb574
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date:   Sun,  3 Jun 2007 01:21:33 +0000

bugfix: raising inbox-mode from label-list-mode

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

Diffstat:
M lib/sup/modes/inbox-mode.rb | 2 ++
M lib/sup/modes/label-list-mode.rb | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/sup/modes/inbox-mode.rb b/lib/sup/modes/inbox-mode.rb
@@ -10,8 +10,10 @@ class InboxMode < ThreadIndexMode
 
   def initialize
     super [:inbox], [:inbox]
+    @@instance = self
   end
 
+  def self.instance; @@instance; end
   def killable?; false; end
 
   def archive
diff --git a/lib/sup/modes/label-list-mode.rb b/lib/sup/modes/label-list-mode.rb
@@ -68,7 +68,7 @@ protected
   def view_results
     label = @labels[curpos]
     if label == :inbox
-      BufferManager.raise_to_front BufferManager["inbox"]
+      BufferManager.raise_to_front InboxMode.instance.buffer
     else
       b = BufferManager.spawn_unless_exists("All threads with label '#{label}'") do
         mode = LabelSearchResultsMode.new [label]