]> git.cworth.org Git - sup/commitdiff
Use underline for highlight
authorCarl Worth <cworth@cworth.org>
Tue, 15 Sep 2009 21:21:16 +0000 (14:21 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 17 Sep 2009 16:31:57 +0000 (09:31 -0700)
Caution: This patch is not suitable for upstream, (William would rather
see a hook for this instead).

lib/sup/colormap.rb

index fbbbfc9e9405d1be3eb88d4dd647b6e96e9e85d8..24b484220324baca5e78fe17e63558b0ade0c534 100644 (file)
@@ -80,38 +80,45 @@ class Colormap
   end
 
   def highlight_for fg, bg, attrs
-    hfg =
-      case fg
-      when Curses::COLOR_BLUE
-        Curses::COLOR_WHITE
-      when Curses::COLOR_YELLOW, Curses::COLOR_GREEN
-        fg
-      else
-        Curses::COLOR_BLACK
-      end
-
-    hbg = 
-      case bg
-      when Curses::COLOR_CYAN
-        Curses::COLOR_YELLOW
-      when Curses::COLOR_YELLOW
-        Curses::COLOR_BLUE
-      else
-        Curses::COLOR_CYAN
-      end
-
-    attrs =
-      if fg == Curses::COLOR_WHITE && attrs.include?(Curses::A_BOLD)
-        [Curses::A_BOLD]
-      else
-        case hfg
-        when Curses::COLOR_BLACK
-          []
-        else
-          [Curses::A_BOLD]
-        end
-      end
-    [hfg, hbg, attrs]
+    [fg, bg, attrs + [Curses::A_UNDERLINE]]
+#    hfg = 
+#      case fg
+#      when Curses::COLOR_YELLOW
+#        Curses::COLOR_BLACK
+#      else
+#        fg
+#      end
+#      case fg
+#      when Curses::COLOR_BLUE
+#        Curses::COLOR_WHITE
+#      when Curses::COLOR_YELLOW, Curses::COLOR_GREEN
+#        fg
+#      else
+#        Curses::COLOR_WHITE
+#      end
+
+#    hbg = Curses::COLOR_YELLOW
+#      case bg
+#      when Curses::COLOR_CYAN
+#        Curses::COLOR_YELLOW
+#      when Curses::COLOR_YELLOW
+#        Curses::COLOR_BLUE
+#      else
+#        Curses::COLOR_BLUE
+#      end
+
+#    attrs =
+#      if attrs.include?(Curses::A_BOLD)
+#        [Curses::A_BOLD]
+#      else
+#        case hfg
+#        when Curses::COLOR_BLACK
+#          []
+#        else
+#          [Curses::A_BOLD]
+#        end
+#      end
+#    [hfg, hbg, attrs]
   end
 
   def color_for sym, highlight=false