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

From Merlin Moncure
Subject Re: fix for readline terminal size problems when window is resized with open pager
Date
Msg-id CAHyXU0xTu6QWRR3H3SX_y=MnaPZOHaqL_=ZyewwQ7MTYgUvd8A@mail.gmail.com
Whole thread Raw
In response to Re: fix for readline terminal size problems when window is resized with open pager  (Tom Lane <tgl@sss.pgh.pa.us>)
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
On Wed, Dec 16, 2015 at 2:12 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Merlin Moncure <mmoncure@gmail.com> writes:
>> On Wed, Dec 16, 2015 at 1:29 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> So I now think that print.c shouldn't be involved at all, and the right
>>> thing to do is just have gets_interactive() invoke the resize function
>>> immediately before calling readline().  That will still leave a window
>>> for SIGWINCH to be missed, but it's a pretty tiny one.
>
>> right -- agreed.
>
> I tried that and found out that the first call dumps core because readline
> hasn't been initialized yet.  To fix that, we need an explicit call to
> rl_initialize() instead of depending on readline() to do it for us.
> So I arrive at the attached modified patch.

This is working great.  Is there anything left for me to do here?

merlin



pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Remove Windows crash dump support?
Next
From: Magnus Hagander
Date:
Subject: Re: Remove Windows crash dump support?