From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.213.28.69 with SMTP id l5cs608213ebc; Fri, 22 Jan 2010 04:08:38 -0800 (PST) Received: by 10.224.89.196 with SMTP id f4mr1910861qam.90.1264162117292; Fri, 22 Jan 2010 04:08:37 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 6si4770429qwd.6.2010.01.22.04.08.36; Fri, 22 Jan 2010 04:08:37 -0800 (PST) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org; dkim=neutral (body hash did not verify) header.i=@gmail.com Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 8D82318582E4; Fri, 22 Jan 2010 07:08:36 -0500 (EST) Received: from mail-qy0-f203.google.com (mail-qy0-f203.google.com [209.85.221.203]) by rubyforge.org (Postfix) with ESMTP id 2B64818582C7 for ; Fri, 22 Jan 2010 07:02:58 -0500 (EST) Received: by qyk41 with SMTP id 41so1153560qyk.29 for ; Fri, 22 Jan 2010 04:02:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:subject:from:to :in-reply-to:references:date:message-id:user-agent :content-transfer-encoding; bh=ZcrhhoqzUUOGeC3ex6swPliKi+27GpaSf2F0qVjviE8=; b=lYJOFBOp1j4YsFkZgKOjnXNLWRmgYF+pgvoF2nJurJ2RbnAXah7Flov81I69yXwmCU nmaNsvONiJMAmwgO7Ut2DKU9gb79IPKh6shVy9u+yQK6h3YqKVR8fv9Nh0zapaeSRdmO GqT9zWa/E8h+lQCXo9y6/EjJKVUj6pSKgiXAg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:subject:from:to:in-reply-to:references:date:message-id :user-agent:content-transfer-encoding; b=wdc2dmzGqYGd8Nfn7untQjvtwPpNxPIiY/MMxhGYHE8QmsXrNUbQRXdDRmRg4xjQc3 zQK0ENOLUpS+0MhBa/vIC6/zWSsulYaSoSXiSeyuFf1cstYMzKBsyn6Y1WzdRmP3pgxo oyZQof0WKHv87moMbLa6atTcDz6mE6D2h/nKQ= Received: by 10.224.44.164 with SMTP id a36mr1887030qaf.149.1264161777731; Fri, 22 Jan 2010 04:02:57 -0800 (PST) Received: from localhost (c-76-98-110-216.hsd1.nj.comcast.net [76.98.110.216]) by mx.google.com with ESMTPS id 22sm1602998qyk.2.2010.01.22.04.02.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 22 Jan 2010 04:02:57 -0800 (PST) From: Eric Sherman To: sup-devel In-reply-to: <1264146400-2101-1-git-send-email-rlane@club.cc.cmu.edu> References: <1264146400-2101-1-git-send-email-rlane@club.cc.cmu.edu> Date: Fri, 22 Jan 2010 07:02:55 -0500 Message-Id: <1264161767-sup-920@changeling.local> User-Agent: Sup/git Subject: Re: [sup-devel] [PATCH] fix textfield truncation X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org 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