sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit bbccaef8f7db2827edfdb1ef675f1af32e2867d2
parent 20213ce0dbab9194b487c2772d3cba83ea7613a8
Author: Rich Lane <rlane@club.cc.cmu.edu>
Date:   Fri, 26 Feb 2010 23:05:33 -0800

clean up diff between master and next

Some mostly stylistic changes had been left out.

Diffstat:
M bin/sup | 15 ++++++++-------
M lib/sup/buffer.rb | 2 ++
M lib/sup/modes/console-mode.rb | 2 +-
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/bin/sup b/bin/sup
@@ -271,15 +271,16 @@ begin
 
     bm.erase_flash
 
-    action = begin
-      if bm.handle_input c
+    action =
+      begin
+        if bm.handle_input c
+          :nothing
+        else
+          bm.resolve_input_with_keymap c, global_keymap
+        end
+      rescue InputSequenceAborted
         :nothing
-      else
-        bm.resolve_input_with_keymap c, global_keymap
       end
-    rescue InputSequenceAborted
-      :nothing
-    end
     case action
     when :quit_now
       break if bm.kill_all_buffers_safely
diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
@@ -30,6 +30,8 @@ module Ncurses
   def mutex; @mutex ||= Mutex.new; end
   def sync &b; mutex.synchronize(&b); end
 
+  ## magically, this stuff seems to work now. i could swear it didn't
+  ## before. hm.
   def nonblocking_getch
     ## INSANTIY
     ## it is NECESSARY to wrap Ncurses.getch in a select() otherwise all
diff --git a/lib/sup/modes/console-mode.rb b/lib/sup/modes/console-mode.rb
@@ -69,7 +69,7 @@ class ConsoleMode < LogMode
   end
 
   def initialize
-    super
+    super "console"
     @console = Console.new self
     @binding = @console.instance_eval { binding }
   end