From: William Morgan Date: Sat, 22 Aug 2009 14:56:15 +0000 (-0400) Subject: Merge branch 'master' into next X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=20886f4b1d1f92c4db17fbd2639ba47fb8888046;hp=-c;p=sup Merge branch 'master' into next --- 20886f4b1d1f92c4db17fbd2639ba47fb8888046 diff --combined lib/sup/textfield.rb index b8dec59,f52aa82..76803bf --- a/lib/sup/textfield.rb +++ b/lib/sup/textfield.rb @@@ -35,9 -35,9 +35,9 @@@ class TextFiel @completion_block = block @field = Ncurses::Form.new_field 1, @width - question.length, @y, @x + question.length, 256, 0 @form = Ncurses::Form.new_form [@field] - @value = default + @value = default || '' Ncurses::Form.post_form @form - set_cursed_value default if default + set_cursed_value @value end def position_cursor @@@ -112,11 -112,11 +112,11 @@@ unless @history.empty? value = get_cursed_value @i ||= @history.size - #Redwood::log "history before #{@history.inspect}" + #debug "history before #{@history.inspect}" @history[@i] = value #unless value =~ /^\s*$/ @i = (@i + (c == Ncurses::KEY_UP ? -1 : 1)) % @history.size @value = @history[@i] - #Redwood::log "history after #{@history.inspect}" + #debug "history after #{@history.inspect}" set_cursed_value @value Ncurses::Form::REQ_END_FIELD end