Re: fix for readline terminal size problems when window is resized with open pager

From: Andreas Karlsson <andreas(at)proxel(dot)se>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: fix for readline terminal size problems when window is resized with open pager
Date: 2015-12-16 11:33:57
Message-ID: 56714C25.7040105@proxel.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2015-12-16 11:54:11 Re: pgbench stats per script & other stuff
Previous Message David Rowley 2015-12-16 10:59:48 Re: Parallel Aggregate