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

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: fix for readline terminal size problems when window is resized with open pager
Дата
Msg-id 20151216173214.GH23112@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: fix for readline terminal size problems when window is resized with open pager  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: fix for readline terminal size problems when window is resized with open pager  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2015-12-16 12:23:28 -0500, Tom Lane wrote:
> It may be that we can't fix this in readline versions that precede the
> introduction of the resize function.  Let me go experiment on my pet
> dinosaurs.

I'm not particularly bothered by not supporting old readline versions
here. If we really want to we could basically directly use
_rl_get_screen_size() - which seems to have been present from before
4.0. It's not declared static...

extern void _rl_get_screen_size (int tty, int ignore_env);
and then   _rl_get_screen_size (fileno (rl_instream), 0);
in ClosePager() seems to do the trick.

Andres



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: fix for readline terminal size problems when window is resized with open pager
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Re: Reusing abbreviated keys during second pass of ordered [set] aggregates