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

From Andres Freund
Subject Re: fix for readline terminal size problems when window is resized with open pager
Date
Msg-id 20151216162433.GC23112@awork2.anarazel.de
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  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

First off: Glad that you investigated, this has been bugging me.

On 2015-12-14 15:57:22 -0600, Merlin Moncure wrote:
> Also, after some experimentation I had better luck with
> rl_reset_screen_size() (vs rl_resize_terminal()) that seemed to give
> more regular behavior with the prompt.  So the consolidated patch with
> the configure check is attached.

Hm. rl_reset_screen_size() works well for me. rl_resize_terminal() not
so much.  Apparently the reason for that is that rl_reset_screen_size()
doesn't set ignore_env to to true when calling
_rl_get_screen_size(). I've verified that just toggling that parameter
changes the behaviour.

What bugs me about that a bit is that _rl_sigwinch_resize_terminal()
sets ignore_env to true.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: fix for readline terminal size problems when window is resized with open pager
Next
From: Dilip Kumar
Date:
Subject: Re: parallel joins, and better parallel explain