From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22163 invoked from network); 1 Apr 1997 00:32:32 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 1 Apr 1997 00:32:32 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id TAA11825; Mon, 31 Mar 1997 19:24:24 -0500 (EST) Resent-Date: Mon, 31 Mar 1997 19:24:24 -0500 (EST) Date: Tue, 1 Apr 1997 01:27:17 +0100 (BST) From: Zefram Message-Id: <18959.199704010027@stone.dcs.warwick.ac.uk> Subject: window size bugfix X-Patch: 249 Resent-Message-ID: <"g5w8n3.0.iu2.uM5Gp"@euclid> To: zsh-workers@math.gatech.edu Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3063 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu -----BEGIN PGP SIGNED MESSAGE----- My previous patch on the subject left out one detail: zlevarsetfn() should be treating a zero size as "unknown" rather than "small". This caused termflags to change erratically on some systems (but, by decree of Murphy, not the one I do development on). -zefram *** Src/params.c Mon Mar 31 04:53:26 1997 --- Src/params.c Tue Apr 1 01:20:22 1997 *************** *** 1251,1273 **** zlevarsetfn(Param pm, long x) { if ((long *)pm->u.data == & columns) { if (x > 2) termflags &= ~TERM_NARROW; ! else { termflags |= TERM_NARROW; - if (x <= 0) - x = 80; /* Arbitary, but same as init.c */ - else - x = 2; - } } else if ((long *)pm->u.data == & lines) { if (x > 2) termflags &= ~TERM_SHORT; ! else { termflags |= TERM_SHORT; - if (x <= 0) - x = 24; /* Arbitrary, but same as init.c */ - } } *((long *)pm->u.data) = x; --- 1251,1269 ---- zlevarsetfn(Param pm, long x) { if ((long *)pm->u.data == & columns) { + if(x <= 0) + x = 80; if (x > 2) termflags &= ~TERM_NARROW; ! else termflags |= TERM_NARROW; } else if ((long *)pm->u.data == & lines) { + if(x <= 0) + x = 24; if (x > 2) termflags &= ~TERM_SHORT; ! else termflags |= TERM_SHORT; } *((long *)pm->u.data) = x; -----BEGIN PGP SIGNATURE----- Version: 2.6.3i Charset: ascii iQCVAwUBM0BWPnD/+HJTpU/hAQGkMAP5AXVPFFcNHJDI40JkFkKIUngHiKaY7AUr crQ9r0h7MBPOm1+QSapfTDJ5/CK1rQ4Pftvy1fg8FTypyo9Oa9ySPw3snGCgDlwG DExcHKno+T1ATCJ59EQk+asz2pecjKCgvQFnjgOubRDjbwtxOvxQf9guY/jWA7BC BNZQtuClCIQ= =WpR3 -----END PGP SIGNATURE-----