From: Eric Sherman <hyperbolist@gmail.com>
To: sup-devel <sup-devel@rubyforge.org>
Subject: Re: [sup-devel] [PATCH] fix textfield truncation
Date: Fri, 22 Jan 2010 07:02:55 -0500 [thread overview]
Message-ID: <1264161767-sup-920@changeling.local> (raw)
In-Reply-To: <1264146400-2101-1-git-send-email-rlane@club.cc.cmu.edu>
This is awesome, thank you!
Excerpts from Rich Lane's message of Fri Jan 22 02:46:40 -0500 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
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel
next prev parent reply other threads:[~2010-01-22 12:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-22 7:46 Rich Lane
2010-01-22 12:02 ` Eric Sherman [this message]
2010-02-27 7:44 ` Rich Lane
2010-03-01 14:49 ` Christian Dietrich
2010-03-01 14:50 ` Christian Dietrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1264161767-sup-920@changeling.local \
--to=hyperbolist@gmail.com \
--cc=sup-devel@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox