Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zle_refresh patch 2

Bart Schaefer wrote:
:On Feb 3,  9:55pm, gwing@xxxxxxxxxxxxxxx wrote:
:} Subject: zle_refresh patch 2
:} It fixes coredumps and bad displays when terms are 1 or 2 lines.
:} When a terminal is 1 or 2 lines high, the terminal will act as if 
:} SINGLE_LINE_ZLE is set.  This avoids many problems with the status line.
:There's already code that causes SINGLE_LINE_ZLE to become set if the
:terminal starts out at, or is shrunk to, 1 line high or 1 column wide.
:(It happens when $COLUMNS or $LINES changes.)  Some of that code is a
:few lines above your changes to test (lines < 3).

:If it's necessary to
:behave as SINGLE_LINE_ZLE for 2 lines as well, the other code should be
:changed so that SINGLE_LINE_ZLE *is* set when zsh is `acting as if' it
:is set.

I was slightly uncertain about the correct behaviour here: should
SINGLE_LINE_ZLE be set when it is `acting as if' it is set?  If it is set,
then if it stops acting as if it is set, does it go back to the previous
value?  I believe if yes to the former, then yes to the latter.  But then,
I don't necessarily believe yes to the former.

Another thing - I suggest you don't set your xterm to 2 columns or less and
setopt SINGLE_LINE_ZLE - I'll have to fix that coredump too.

I just tried your patch on my *old* source - ouch - coredump in setintenv() 
884   if ((pm = (Param) paramtab->getnode(paramtab, s)) && pm->env) {
(gdb) print paramtab
$1 = (struct hashtable *) 0x0

Hope it works OK for you.
Geoff Wing [gwing@xxxxxxxxxxxxxxx]   Technical Manager
  Phone    : +61-3-9818 2977         PrimeNet - Internet Consultancy
  Facsimile: +61-3-9819 3788         Web : <URL:http://www.primenet.com.au/>
  Mobile   : 0412 162 441

Messages sorted by: Reverse Date, Date, Thread, Author