This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix truncation of TUI command history
- From: Patrick Palka <patrick at parcs dot ath dot cx>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 4 Sep 2014 08:17:20 -0400
- Subject: Re: [PATCH] Fix truncation of TUI command history
- Authentication-results: sourceware.org; auth=none
- References: <1409422278-19284-1-git-send-email-patrick at parcs dot ath dot cx> <54083483 dot 6080502 at redhat dot com>
On Thu, Sep 4, 2014 at 5:44 AM, Pedro Alves <palves@redhat.com> wrote:
> Hi Patrick,
>
> On 08/30/2014 07:11 PM, Patrick Palka wrote:
>> index aa14790..eee5f1ac6 100644
>> --- a/gdb/tui/tui-io.c
>> +++ b/gdb/tui/tui-io.c
>> @@ -678,8 +678,9 @@ tui_getc (FILE *fp)
>> }
>> else
>> {
>> + /* Move cursor to the end of the command line. */
>> wmove (w, TUI_CMD_WIN->detail.command_info.cur_line,
>> - TUI_CMD_WIN->detail.command_info.curch);
>> + strlen (tui_rl_saved_prompt) + rl_end);
>> waddch (w, ch);
>
> Does this still do the right thing with secondary prompts?
>
> E.g., if you do "quit" while a program is running, and then
> press enter a few times just to have the query repeat (and
> then pagination kick in, for extra stress).
>
> Thanks,
> Pedro Alves
>
Good point. It doesn't work correctly in this case. I'll try to find
a better solution.