This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH 1/2] tui: make updating of start_line in tui_puts more consistent
- From: Pedro Alves <palves at redhat dot com>
- To: Patrick Palka <patrick at parcs dot ath dot cx>, gdb-patches at sourceware dot org
- Date: Thu, 10 Sep 2015 16:25:12 +0100
- Subject: Re: [PATCH 1/2] tui: make updating of start_line in tui_puts more consistent
- Authentication-results: sourceware.org; auth=none
- References: <1440551173-18266-1-git-send-email-patrick at parcs dot ath dot cx>
On 08/26/2015 02:06 AM, Patrick Palka wrote:
> The command window's start_line field is used by the function
> tui_redisplay_readline to figure out on which window line to start
> redrawing the (possibly multi-line) command line. It differs from the Y
> coordinate of the window cursor only when the length of the line being
> outputted is longer than the width of the window.
> The function tui_puts however currently does not respect this property
> of start_line. After a call to tui_puts, start_line will always be
> equal to cur_line even when the outputted line may have wrapped a few
> times. This patch makes tui_puts update start_line in a way that's
> consistent with how tui_redisplay_readline does it. This patch also
> explicitly documents this property of start_line.
> * tui/tui-data.h (tui_command_info): Add comment documenting the
> field start_line.
> * tui/tui-io.c (tui_puts): Fix the updating of start_line.