zsh-workers
 help / color / mirror / code / Atom feed
* window size bugfix
@ 1997-04-01  0:27 Zefram
  0 siblings, 0 replies; only message in thread
From: Zefram @ 1997-04-01  0:27 UTC (permalink / raw)
  To: zsh-workers

-----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-----


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-04-01  0:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-04-01  0:27 window size bugfix Zefram

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).