This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Ensure rl_get_screen_size() returns the actual terminal dimensions
- From: Pedro Alves <palves at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>, Patrick Palka <patrick at parcs dot ath dot cx>, gdb-patches at sourceware dot org
- Date: Thu, 04 Sep 2014 11:52:04 +0100
- Subject: Re: [PATCH] Ensure rl_get_screen_size() returns the actual terminal dimensions
- Authentication-results: sourceware.org; auth=none
- References: <1409534708-31981-1-git-send-email-patrick at parcs dot ath dot cx> <54084361 dot 1020906 at redhat dot com>
On 09/04/2014 11:48 AM, Pedro Alves wrote:
> On 09/01/2014 02:25 AM, Patrick Palka wrote:
>> We should call rl_resize_terminal() before calling rl_get_screen_size()
>> to help ensure that rl_get_screen_size() will return the correct
>> terminal dimensions. Doing so fixes a couple issues where TUI does not
>> correctly resize itself due to rl_get_screen_size() returning stale
>> terminal dimensions.
>>
>> * tui/tui-win.c (tui_resize_all): Call rl_resize_terminal before
>> calling rl_get_screen_size.
>
> OK.
Actually, I take that back, for a moment.
readline's rl_sigwinch_handler already call rl_resize_terminal, and then
chains into the TUI's handler. So, why do we need this?
Thanks,
Pedro Alves