* zsh 3.0.5 WINSZ stuff is messing up my vi
@ 1997-12-10 6:07 Bart Schaefer
0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 1997-12-10 6:07 UTC (permalink / raw)
To: zsh-workers
My email program starts an editor with "xterm -geometry 80x48 -e vi ...".
If I subsequently run any shell command from that editor (e.g. "!Gfmt -72"),
zsh forces the terminal size to 80x24, which then messes up the vi session.
I compared strace output for zsh-3.0.4 and zsh-3.0.5 and the interesting
diff is that zsh-3.0.5 -c calls ioctl(TIOCSWINSZ), even with both stdin
and stdout redirected:
ioctl(10, TIOCSWINSZ, {ws_row=48, ws_col=80, ws_xpixel=480, ws_ypixel=624}) = 0
ioctl(10, TIOCGWINSZ, {ws_row=48, ws_col=80, ws_xpixel=480, ws_ypixel=624}) = 0
ioctl(10, TIOCSWINSZ, {ws_row=48, ws_col=80, ws_xpixel=480, ws_ypixel=624}) = 0
ioctl(10, TIOCGWINSZ, {ws_row=48, ws_col=80, ws_xpixel=480, ws_ypixel=624}) = 0
(The output above shows ws_row=48 because I ran it from within another shell
that already had the window size set correctly.)
zsh -fc does not TIOCSWINSZ in either version, but 3.0.5 performs TIOCGWINSZ
five times for 3.0.4's once.
I think the problem may be that adjustwinsize(0) is being called before all
the opts[] values have been properly initialized, which makes it think that
zsh is interactive -- but I haven't yet tracked it down.
I can mail strace output if necessary, but it's easily seen with
strace zsh -c exit < /dev/null 2>&1 | grep WINSZ
If instead I run
(unset LINES COLUMNS ; strace zsh -c exit < /dev/null 2>&1 | grep WINSZ)
then I get identical behavior from zsh-3.0.4 and 3.0.5 -- so I suspect it
has something to do with the new code to import LINES and COLUMNS when
they are set. In the case of "xterm -geometry ..." any LINES or COLUMNS
in the environment are completely irrelevant; but the real bug is that zsh
isn't properly detecting that it is NOT interactive.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-12-10 6:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-10 6:07 zsh 3.0.5 WINSZ stuff is messing up my vi Bart Schaefer
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).