sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit cbd72b765e83fbafae412cac85dfc2db03314b9c
parent c492bac842cd51193ce4e21f042b6998d220e3a3
Author: Gaute Hope <eg@gaute.vetsj.com>
Date:   Sat, 29 Nov 2014 10:27:02 +0100

Merge #352: add a more useful error message when on non-color terminal

Diffstat:
M lib/sup/colormap.rb | 3 +++
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/lib/sup/colormap.rb b/lib/sup/colormap.rb
@@ -17,6 +17,9 @@ module Ncurses
 
     ## xterm 24-shade grayscale
     24.times { |x| color! "g#{x}", (16+6*6*6) + x }
+  elsif Ncurses::NUM_COLORS == -1
+    ## Terminal emulator doesn't appear to support colors
+    raise ArgumentError, "sup must be run in a terminal with color support"
   end
 end