commit e1750c0ec032b48d79947c7358a568d5aa52a8b5
parent 78b284604207bde8a0b856a3a92d2adedea2ebfc
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Mon, 10 Dec 2007 06:33:56 +0000
make edit-message-mode every so slightly less hideously ugly
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@764 5c8cc53c-5e98-4d25-b20a-d8db53a31250
Diffstat:
2 files changed, 4 insertions(+), 23 deletions(-)
diff --git a/lib/sup/horizontal-selector.rb b/lib/sup/horizontal-selector.rb
@@ -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
diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb
@@ -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