]> git.cworth.org Git - sup/commitdiff
make edit-message-mode every so slightly less hideously ugly
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 10 Dec 2007 06:33:56 +0000 (06:33 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 10 Dec 2007 06:33:56 +0000 (06:33 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@764 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/horizontal-selector.rb
lib/sup/modes/edit-message-mode.rb

index 8ef30fed0e18a57e3c373add01af51901cfa0555..aef16d4844e2379d65c910332e4317eb758add19 100644 (file)
@@ -16,25 +16,6 @@ class HorizontalSelector
 
   def val; @vals[@selection] end
 
-  def old_line width=nil
-    label =
-      if width
-        sprintf "%#{width}s ", @label
-      else
-        "#{@label} "
-      end
-
-    [[:none, label]] + 
-      (0 ... @labels.length).inject([]) do |array, i|
-        array + [
-          if i == @selection
-            [@selected_color, "[" + @labels[i] + "]"]
-          else
-            [@base_color, " " + @labels[i] + " "]
-          end] + [[:none, " "]]
-      end + [[:none, ""]]
-  end
-
   def line width=nil
     label =
       if width
@@ -43,15 +24,15 @@ class HorizontalSelector
         "#{@label} "
       end
 
-    [[:none, label]] + 
+    [[@base_color, label]] + 
       (0 ... @labels.length).inject([]) do |array, i|
         array + [
           if i == @selection
             [@selected_color, @labels[i]]
           else
             [@base_color, @labels[i]]
-          end] + [[:none, "  "]]
-      end + [[:none, ""]]
+          end] + [[@base_color, "  "]]
+      end + [[@base_color, ""]]
   end
 
   def roll_left
index 78e88965c8a03e210f4fec4347c1eba73c135e67..fa3479022603d2b67ea3a22fda8ed6adaca2fe68 100644 (file)
@@ -94,7 +94,7 @@ EOS
     elsif i < @selectors.length
       @selectors[i].line @selector_label_width
     elsif i == @selectors.length
-      "-" * buffer.content_width
+      ""
     else
       @text[i - @selectors.length - DECORATION_LINES]
     end