Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 3.0.5: eval `resize` messes up
- X-seq: zsh-workers 3989
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Clint Olsen <olsenc@xxxxxxxxxxxxxxxx>
- Subject: Re: 3.0.5: eval `resize` messes up
- Date: Tue, 19 May 1998 10:27:49 -0700
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <19980519094017.A9893@xxxxxxxxxxxxxxxxxxxxxx>
- References: <199805180745.AA013327509@xxxxxxxxxxxxxxxxxxxx> <19980512092717.A13425@xxxxxxxxxxxxxxxxxxxxxx> <19980518011037.A25015@xxxxxxxxxxxxxxxxxxxxxx> <980518112027.ZM10579@xxxxxxxxxxxxxxxxxxxxxxx> <19980519002131.C4456@xxxxxxxxxxxxxxxxxxxxxx> <980519093419.ZM14978@xxxxxxxxxxxxxxxxxxxxxxx> <19980519094017.A9893@xxxxxxxxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author