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

From: Christian Dietrich <[email-masked]>
Date: Mon, 01 Mar 2010 15:49:08 +0100

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.
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: Rich Lane <[email-masked]>
Date: Thu, 21 Jan 2010 23:46:40 -0800

1.6.3.3

---

From: Eric Sherman <[email-masked]>
Date: Fri, 22 Jan 2010 07:02:55 -0500

This is awesome, thank you!

---

From: Christian Dietrich <[email-masked]>
Date: Mon, 01 Mar 2010 15:50:14 +0100

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

Sorry, didn't see the other message with the explanation yet.

---

From: Rich Lane <[email-masked]>
Date: Sat, 27 Feb 2010 02:44:36 -0500

Applied to master.