[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 80 columns even after resize
From: |
Chet Ramey |
Subject: |
Re: 80 columns even after resize |
Date: |
Mon, 7 Jan 2002 08:35:50 -0500 |
> I think I found a bug in bash or readline maybe. Something
> wrong happens when I do following things:
> 1) start a new xterm (rxvt, whatever)
> 2) start an (probably ncurses based) application like
> mc, vi, vim, less, mutt, pine, aumix, ...
> 3) change the window size to something different than 80 columns
> 4) exit the application
>
> after typing every 80 chars the cursor jumps back to the
> beginning of line even though the number of columns is not 80.
I need to make this an FAQ.
There is no way for bash/readline to know that the window size has
changed unless you tell it, since the kernel sent the SIGWINCH to the
foreground process (mc, vi, vim, whatever).
You can force bash/readline to notice the change either by setting the
LINES variable to the correct value, or, if you want bash to check the
window size after every command, runing
shopt -s checkwinsize
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)
Chet Ramey, CWRU chet@po.CWRU.Edu http://cnswww.cns.cwru.edu/~chet/