From: bachjh@googlemail.com (Jörg-Hendrik Bach)
Subject: [sup-talk] ncurses hack
Date: Tue, 18 Aug 2009 21:31:35 +0200 [thread overview]
Message-ID: <91de50e10908181231h2f8f4cbdr6ab546aa4a3466ca@mail.gmail.com> (raw)
In-Reply-To: <1250619721-sup-91@localdomain>
2009/8/18 Beno?t PIERRE <benoit.pierre at gmail.com>:
> 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
Thanks a lot. I don't know what this does exactly, but the first added
line of that patch was sufficient to get searches with utf-8 running
well from startup, without the need to go for a dummy search each time
i restarted sup.
The full patch (including the replacement at line 41) broke searching
altogether, on hitting '\' it throws:
--- TypeError from thread: main
can't convert nil into String
/usr/lib/ruby/gems/1.8/gems/sup-0.8.1/lib/sup/textfield.rb:159:in
`set_field_buffer'
/usr/lib/ruby/gems/1.8/gems/sup-0.8.1/lib/sup/textfield.rb:159:in
`set_cursed_value'
/usr/lib/ruby/gems/1.8/gems/sup-0.8.1/lib/sup/textfield.rb:42:in `activate'
/usr/lib/ruby/gems/1.8/gems/sup-0.8.1/lib/sup/buffer.rb:537:in `ask'
/usr/lib/ruby/gems/1.8/gems/sup-0.8.1/lib/sup/buffer.rb:26:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/sup-0.8.1/lib/sup/buffer.rb:26:in `sync'
/usr/lib/ruby/gems/1.8/gems/sup-0.8.1/lib/sup/buffer.rb:536:in `ask'
/usr/lib/ruby/gems/1.8/gems/sup-0.8.1/lib/sup/util.rb:513:in `send'
/usr/lib/ruby/gems/1.8/gems/sup-0.8.1/lib/sup/util.rb:513:in `method_missing'
/usr/lib/ruby/gems/1.8/gems/sup-0.8.1/bin/sup:268
/usr/bin/sup:19:in `load'
/usr/bin/sup:19
- J?rg-Hendrik
prev parent reply other threads:[~2009-08-18 19:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-17 19:54 Edward Z. Yang
2009-08-18 2:43 ` William Morgan
2009-08-18 7:42 ` Dusan
2009-08-18 18:24 ` Benoît PIERRE
2009-08-18 18:46 ` Dusan
2009-08-18 18:59 ` Benoît PIERRE
2009-08-18 19:04 ` Dusan
2009-08-18 19:24 ` Dusan
2009-08-18 19:31 ` Jörg-Hendrik Bach [this message]
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=91de50e10908181231h2f8f4cbdr6ab546aa4a3466ca@mail.gmail.com \
--to=bachjh@googlemail.com \
/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