From: ef_dva@yahoo.com (Dusan)
Subject: [sup-talk] ncurses hack
Date: Tue, 18 Aug 2009 21:24:44 +0200 [thread overview]
Message-ID: <1250623031-sup-6731@archpc> (raw)
In-Reply-To: <1250621614-sup-5683@localdomain>
Excerpts from Beno?t PIERRE's message of Tue Aug 18 20:59:20 +0200 2009:
> Excerpts from Dusan's message of Tue Aug 18 20:46:52 +0200 2009:
> > Excerpts from Beno?t PIERRE's message of Tue Aug 18 20:24:45 +0200 2009:
> > > Excerpts from Dusan's message of Tue Aug 18 09:42:48 +0200 2009:
> >
> > [...]
> >
> > I will, just give me day or two. I am using gem version, not svn or git.
> > I did some stuff with them but never with ruby. Can you give me two
> > lines help what to install and where? Latest svn?
>
> You can probably directly patch the sources in the gem. For example on
> Ubuntu, the sources should be somewhere in /var/lib/gems/1.8/gems/sup-xxx.
>
> Use 'gem environment' to get the installation directory.
>
> Another option is to follow the wiki to get the latest git version:
> http://sup.rubyforge.org/wiki/wiki.pl?Contributing
Bah, I could not wait till tomorrow and it's not _that_ late...
This fix WORKS :) Every time so far. Please include this into release
asap, this is what prevents a lot of people from using sup.
I patched source with vim, diff is too automatic :)
Here is func that works:
activate window, y, x, width, question, default=nil, &block
@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
@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
Probably @value=default can go too, not sure since I don't know ruby?
Thanks a lot!
next prev parent reply other threads:[~2009-08-18 19:24 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 [this message]
2009-08-18 19:31 ` Jörg-Hendrik Bach
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=1250623031-sup-6731@archpc \
--to=ef_dva@yahoo.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