zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <zefram@dcs.warwick.ac.uk>
To: zsh-workers@math.gatech.edu
Subject: window size bugfix
Date: Tue, 1 Apr 1997 01:27:17 +0100 (BST)	[thread overview]
Message-ID: <18959.199704010027@stone.dcs.warwick.ac.uk> (raw)

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


                 reply	other threads:[~1997-04-01  0:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18959.199704010027@stone.dcs.warwick.ac.uk \
    --to=zefram@dcs.warwick.ac.uk \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).