From 3e7b378188cc366682503ce0264058e955529ab9 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael@stapelberg.de>
Date: Mon, 15 Feb 2010 23:09:19 +0100
Subject: [PATCH] Bugfix: Create dynamically growing fields (long filenames are now supported)

---
 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..32d34b5 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.field_opts_off(Ncurses::Form::O_STATIC)
+    @field.max_field = 0
     @form = Ncurses::Form.new_form [@field]
     @value = default || ''
     Ncurses::Form.post_form @form
-- 
1.6.5

