Apparently, field_buffer content is not initialized to blanks when using
the wide-character version of ncurses. Forcing a call to
set_field_buffer fix the problem.
---
 lib/sup/textfield.rb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/sup/textfield.rb b/lib/sup/textfield.rb
index b8dec59..76803bf 100644
--- a/lib/sup/textfield.rb
+++ b/lib/sup/textfield.rb
@@ -35,9 +35,9 @@ class TextField
     @completion_block = block
     @field = Ncurses::Form.new_field 1, @width - question.length, @y, @x + 
question.length, 256, 0
     @form = Ncurses::Form.new_form [...@field]
-    @value = default
+    @value = default || ''
     Ncurses::Form.post_form @form
-    set_cursed_value default if default
+    set_cursed_value @value
   end
 
   def position_cursor
-- 
1.6.3.3
-- 
A: Because it destroys the flow of conversation.
Q: Why is top posting dumb?

Attachment: signature.asc
Description: PGP signature

_______________________________________________
sup-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/sup-talk

Reply via email to