From: Patrick Palka <patrick@parcs.ath.cx>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] TUI: rewrite tui_query_hook()
Date: Thu, 08 Jan 2015 12:40:00 -0000 [thread overview]
Message-ID: <CA+C-WL9Rjo3sHC1P4wHWB37uuvxUoPVPaypr3dQ9yvJU0D_-ZA@mail.gmail.com> (raw)
In-Reply-To: <54AE640B.3000701@redhat.com>
On Thu, Jan 8, 2015 at 6:03 AM, Pedro Alves <palves@redhat.com> wrote:
> On 01/08/2015 03:50 AM, Patrick Palka wrote:
>> This patch rewrites tui_query_hook() to print things via tui_puts() and
>> to read in a line of input via wgetnstr(). The main motivation for this
>> rewrite is to get the backspace key to work correctly during a quit
>> prompt so that the user can revise their answer before pressing enter.
>> The backspace key now works correctly because we now use getstr()
>> instead of successive calls to getch().
>
> Pagination, done in prompt_for_continue, gets away without this hook, as
> it's written in terms of readline. If we did the same to defaulted_query,
> I think the default code would just work for the TUI too. Did you
> consider that?
This is complicated by the fact that the default query code inserts
annotations before and after the query. If we use
gdb_readline_wrapper to print the query and wait for input then the
2nd annotation will not be printed in a timely manner because
gdb_readline_wrapper blocks until a response is given by the user.
>
> Thanks,
> Pedro Alves
>
next prev parent reply other threads:[~2015-01-08 12:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 3:51 Patrick Palka
2015-01-08 11:03 ` Pedro Alves
2015-01-08 12:40 ` Patrick Palka [this message]
2015-01-08 13:53 ` Pedro Alves
2015-01-08 14:10 ` Patrick Palka
2015-01-08 14:14 ` Patrick Palka
2015-01-08 14:25 ` Patrick Palka
2015-01-08 15:17 ` [PATCH] Consolidate the custom TUI query hook with default query hook Patrick Palka
2015-01-08 15:50 ` Pedro Alves
2015-01-08 13:31 ` [PATCH] TUI: rewrite tui_query_hook() Eli Zaretskii
2015-01-08 13:43 ` Patrick Palka
2015-01-08 13:57 ` Pedro Alves
2015-01-08 14:14 ` Eli Zaretskii
2015-01-08 14:27 ` Patrick Palka
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=CA+C-WL9Rjo3sHC1P4wHWB37uuvxUoPVPaypr3dQ9yvJU0D_-ZA@mail.gmail.com \
--to=patrick@parcs.ath.cx \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.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