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

window size bugfix



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



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