Re: fix for readline terminal size problems when window is resized with open pager - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: fix for readline terminal size problems when window is resized with open pager
Date
Msg-id 56714C25.7040105@proxel.se
Whole thread Raw
In response to Re: fix for readline terminal size problems when window is resized with open pager  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: fix for readline terminal size problems when window is resized with open pager
List pgsql-hackers
On 12/14/2015 01:57 PM, Merlin Moncure wrote:
> This may be moot; some testing demonstrated that libedit was not
> impacted so it really comes down to having the right readline api call
> available.  Looking at the code ISTM that libedit resets the terminal
> on every prompt.

Did you manage to figure out why one was better than the other? The 
differences between the functions seem rather subtle.

rl_reset_screen_size()

Does not respect the COLUMNS and ROWS environment variables.

_rl_sigwinch_resize_terminal()

Internal callback, does the same thing as
rl_reset_screen_size() except that it also respects COLUMNS and ROWS.

rl_resize_terminal()

Respects COLUMNS and ROWS and also has some logic when echo mode is 
turned on which I have not managed to understand yet.

Btw, really nice to see someone working at this. It has bugged me a long 
time.

Andreas



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Parallel Aggregate
Next
From: Fabien COELHO
Date:
Subject: Re: pgbench stats per script & other stuff