This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: window resizing not updating COLUMNS and LINES


On Wed, May 31, 2006 at 05:19:15PM -0500, mwoehlke wrote:
> Kenneth Nellis wrote:
> >mwoehlke wrote:
> >>Kenneth Nellis wrote:
> >>>I'm not seeing the LINES and COLUMNS environment variables getting 
> >>>updated
> >>>correctly after resizing my terminal window. This occurs whether I'm 
> >>>using
> >>>rxvt or xterm. Furthermore, "echo $COLUMNS" and "printenv COLUMNS" don't
> >>>agree. (I didn't see relevant articles in the archives.)
> >>>
> >>>This occurs regardless of how "shopt -s checkwinsize" is set.
> >>
> >>FWIW, on *my* Cygwin, LINES and COLUMNS aren't even set... go figure.
> >>:-)
> >
> >Same here...I do my own export to get things started. --Ken
> 
> Wait, wait, step back... this in itself sounds like a problem. Can 
> anyone on the list verify that Cygwin's bash is setting these *at all*? 
> (Of course, Ken's OP seems to imply he has it at least half working, but 
> something smells fishy here...)
> 
> Bash is *supposed* to set these behind-the-scenes without your doing 
> anything. This seems to be how it works on Linux...

readline set's these variables in shell.c:sh_set_lines_and_columns. This
gets called from terminal.c:_rl_get_screen_size which get's called from
terminal.c:rl_resize_terminal.

It also get's called from terminal.c:_rl_init_terminal_io. The best way
to resolve this problem is to get a version of bash compiled with debug
and set breakpoints at the places I've mentioned..

Bob Rossi

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]