delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/05/31/19:26:13

X-Spam-Check-By: sourceware.org
Date: Wed, 31 May 2006 19:26:05 -0400
From: Bob Rossi <bob_rossi AT cox DOT net>
To: cygwin AT cygwin DOT com
Subject: Re: window resizing not updating COLUMNS and LINES
Message-ID: <20060531232605.GB3374@brasko.net>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <004501c684ea$9aeb3f80$be32000a AT idirect DOT net> <e5l4p3$uh8$1 AT sea DOT gmane DOT org>
Mime-Version: 1.0
In-Reply-To: <e5l4p3$uh8$1@sea.gmane.org>
User-Agent: Mutt/1.5.9i
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019