[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sup-devel] [PATCH] fix textfield truncation



Excerpts from Rich Lane's message of Fr Jan 22 08:46:40 +0100 2010:
> Long query strings (for example) are (for some people) silently truncated.
> Other people have seen large amounts of whitespace inserted at word boundaries.
> These issues are caused by using a multiline text field. This patch uses a
> single-line dynamically growable textfield instead. It also disables the
> field-blanking misfeature.
> ---
>  lib/sup/textfield.rb |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/sup/textfield.rb b/lib/sup/textfield.rb
> index 9afeb34..1c19751 100644
> --- a/lib/sup/textfield.rb
> +++ b/lib/sup/textfield.rb
> @@ -33,7 +33,9 @@ class TextField
>      @w, @y, @x, @width = window, y, x, width
>      @question = question
>      @completion_block = block
> -    @field = Ncurses::Form.new_field 1, @width - question.length, @y, @x + question.length, 256, 0
> +    @field = Ncurses::Form.new_field 1, @width - question.length, @y, @x + question.length, 0, 0
> +    @field.opts_off Ncurses::Form::O_STATIC
> +    @field.opts_off Ncurses::Form::O_BLANK
>      @form = Ncurses::Form.new_form [@field]
>      @value = default || ''
>      Ncurses::Form.post_form @form

Breaks sup here, says opts_off isn't a method, using

iU  libncurses-ruby1.8                      1.2.4-2 ruby Extension for the ncurses C library

from debian sid. What version should i use, in order to make this
work?

greetz didi

-- 
No documentation is better than bad documentation
-- Das Ausdrucken dieser Mail wird urheberrechtlich verfolgt.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel