bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-readline] readline modified env (LINES+COLUMNS)


From: Jan Kratochvil
Subject: Re: [Bug-readline] readline modified env (LINES+COLUMNS)
Date: Mon, 16 Sep 2013 14:07:35 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, 16 Sep 2013 00:14:43 +0200, Chet Ramey wrote:
> I disagree for the same reasons as in the previous thread.  If the gdb
> developers don't want this to happen, you can disable readline's SIGWINCH
> processing (rl_handle_sigwinch = 0), use its own SIGWINCH handler, and
> set readline's idea of the screen dimensions using rl_set_screen_size().

This is a workaround only; I have filed it for GDB as:
        https://sourceware.org/bugzilla/show_bug.cgi?id=15958

We could argue if LINES and COLUMNS were already set in the environment
whether they should be updated or not to their actual value.  But nowadays
applications use termios to get lines/columns so adding these two variable if
they were not set is not useful and moreover it can be unwanted, as seen
above.

bash - as an application using readline - already replaces
sh_set_lines_and_columns() which means the readline API is not perfect. 
Just readline shell.c is designed to be replaced by bash IIUC where for other
applications replacement of just sh_set_lines_and_columns() is not so easy (as
they would need to replace also other functions from shell.c).


Jan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]