[Rush-developer] rush/lib/rush combo_box.rb default_config.rb
reynvlietstra at rubyforge.org
reynvlietstra at rubyforge.org
Mon Aug 29 17:27:39 EDT 2005
Update of /var/cvs/rush/rush/lib/rush
In directory rubyforge.org:/tmp/cvs-serv5310/lib/rush
Modified Files:
combo_box.rb default_config.rb
Log Message:
rush is now editable from within itself :D
Index: combo_box.rb
===================================================================
RCS file: /var/cvs/rush/rush/lib/rush/combo_box.rb,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** combo_box.rb 29 Aug 2005 14:10:34 -0000 1.3
--- combo_box.rb 29 Aug 2005 21:27:36 -0000 1.4
***************
*** 79,85 ****
if (@items[@top+i].text =~ /^#{@currentword}/) != nil and @currentword != ""
! @subwindow.attron(Curses::A_UNDERLINE)
0.upto(@currentword.length-1){|l| @subwindow.addstr("%c" % @currentword[l]) }
! @subwindow.attroff(Curses::A_UNDERLINE)
@subwindow.addstr(@items[@top+i].text[@currentword.length..-1])
@subwindow.clrtoeol
--- 79,85 ----
if (@items[@top+i].text =~ /^#{@currentword}/) != nil and @currentword != ""
! @subwindow.attron($env[:selection_attr])
0.upto(@currentword.length-1){|l| @subwindow.addstr("%c" % @currentword[l]) }
! @subwindow.attroff($env[:selection_attr])
@subwindow.addstr(@items[@top+i].text[@currentword.length..-1])
@subwindow.clrtoeol
Index: default_config.rb
===================================================================
RCS file: /var/cvs/rush/rush/lib/rush/default_config.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** default_config.rb 29 Aug 2005 14:00:24 -0000 1.2
--- default_config.rb 29 Aug 2005 21:27:37 -0000 1.3
***************
*** 21,24 ****
--- 21,25 ----
$env = {}
$env[:prompt] = "Dir.getwd.to_s+\"> \""
+ $env[:selection_attr] = Curses::A_STANDOUT
Alias.set("vi","^vi")
Alias.set("cat","!cat")
More information about the Rush-developer
mailing list