From mboxrd@z Thu Jan 1 00:00:00 1970 From: benoit.pierre@gmail.com (=?utf-8?q?Beno=C3=AEt_PIERRE?=) Date: Tue, 18 Aug 2009 20:24:45 +0200 Subject: [sup-talk] ncurses hack In-Reply-To: <1250580593-sup-1346@archpc> References: <1250538875-sup-2195@javelin> <1250563136-sup-432@masanjin.net> <1250580593-sup-1346@archpc> Message-ID: <1250619721-sup-91@localdomain> Excerpts from Dusan's message of Tue Aug 18 09:42:48 +0200 2009: > > [...] > > Not being able to fix search/save and other edits is huge show-stopper. > I do what I read somewhere: > > -start search, get garbage results > -kill that buffer with 'x' > -start another search but instead of typing search term again first > repeat: press up, delete search garbage, press up, delete search > garbage, repeat until there is nothing to delete > -type another search term and search now works 100% > > This works for searches but edits like save still fail (or save X((%^1X file > so if you can find it you can rename it). > > Looks like fixable bug to simulate what I did for searches? Repeat in > code ten times 'up arrow', '50 x delete char'? Sorry if I am wrong. > > Using sup and not being able to properly search or save is too wrong. > > If there is any config/version I should report to get this fixed just > let me know. Without waiting for new ruby of course -- I do have proper > results when I repeat deleting ritual. Hi, can you try the following patch and tell me if it fix the problem? diff --git a/lib/sup/textfield.rb b/lib/sup/textfield.rb index b8dec59..ccc8533 100644 --- a/lib/sup/textfield.rb +++ b/lib/sup/textfield.rb @@ -36,8 +36,9 @@ class TextField @field = Ncurses::Form.new_field 1, @width - question.length, @y, @x + question.length, 256, 0 @form = Ncurses::Form.new_form [@field] @value = default + @value ||= '' Ncurses::Form.post_form @form - set_cursed_value default if default + set_cursed_value @value end def position_cursor -- A: Because it destroys the flow of conversation. Q: Why is top posting dumb?