zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Clint Olsen <olsenc@ichips.intel.com>
Cc: zsh-workers@math.gatech.edu
Subject: Re: 3.0.5: eval `resize` messes up
Date: Tue, 19 May 1998 10:27:49 -0700	[thread overview]
Message-ID: <980519102749.ZM15183@candle.brasslantern.com> (raw)
In-Reply-To: <19980519094017.A9893@dtthp169.pdx.intel.com>

On May 19,  9:40am, Clint Olsen wrote:
} Subject: Re: 3.0.5: eval `resize` messes up
}
} On May 19, Bart Schaefer wrote:
} > 
} > OK, next question ... what exactly does it not do, that 3.0.2 does?
} 
} Eval `resize` no longer sets the window to the new size so that programs
} like less etc. etc. use the correct terminal window size.

Ah!  Now we're getting somewhere.  If you look in Src/utils.c at around
lines 875-885 you'll see that setting the window size now happens only
when COLUMNS and LINES actually change (rather than on every settyinfo()
as it did before) and that it's now conditional upon `interact' being
true.  If you're interested in running the debugger, you could check the
value of the `from' parameter in adjustwinsize() and see whether that
`if (interact && ...)' case is executing.

The first thing I'd check, though, is that configure did its job correctly
so that TIOCGWINSZ is actually defined at that point when compiling utils.c.
The code in adjustwinsize() is definitely working for me on Linux; I tried
this experiment:

zagzig[38] foo=$(resize)
( stretch the xterm to be much bigger than it was )
zagzig[39] vi
( verify that vim is using the new terminal size )
zagzig[40] eval $foo
zagzig[41] unset LINES COLUMNS
zagzig[42] vi
( vim is now using the old, smaller terminal size )

With LINES and COLUMNS unset, the only place vim could have read the smaller
terminal size is from the tty driver, so zsh must have reset it at the time
of the `eval $foo'.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


      parent reply	other threads:[~1998-05-19 17:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-12 16:27 Clint Olsen
1998-05-18  7:45 ` Tatsuo Furukawa
1998-05-18  8:10   ` Clint Olsen
1998-05-18 18:20     ` Bart Schaefer
1998-05-19  7:21       ` Clint Olsen
     [not found]         ` <980519093419.ZM14978@candle.brasslantern.com>
     [not found]           ` <19980519094017.A9893@dtthp169.pdx.intel.com>
1998-05-19 17:27             ` Bart Schaefer [this message]

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=980519102749.ZM15183@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=olsenc@ichips.intel.com \
    --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).