why doesnt vi resize itself in xterm and other weirdness

Sean Eric Fagan sef at kithrup.COM
Tue Jan 15 20:54:22 AEST 1991


In article <1991Jan14.215038.9834 at portia.Stanford.EDU> fangchin at elaine8.stanford.edu (Chin Fang) writes:
>I always can at least manually tell vi, emacs, less, more etc to adjust
>to the right window size by typing (or including in appropriate login
>initialization files, depending your shell):
>
>stty cols c# rows r# [enter]

Once again (repeating what I'd said in my post to which he followed up),
only the STREAMS ptys in 3.2 support the rows and columns features
(TIOCGWINSZ, I believe, and TIOCSWINSZ to set).  stty does not support it at
all, since no supported ttys support them.  Since they are not supported,
vi, more, and all other utilities distributed by the vendors (well, SCO and
AT&T at least) do not support it; I can make emacs and less support it, but
it would be futile, since only the STREAMS ptys would allow the ioctl.

Instead, use the LINES and COLUMNS variables; terminfo utilities, at least,
will use this; I forget whether or not termcap checks it.

-- 
Sean Eric Fagan  | "I made the universe, but please don't blame me for it;
sef at kithrup.COM  |  I had a bellyache at the time."
-----------------+           -- The Turtle (Stephen King, _It_)
Any opinions expressed are my own, and generally unpopular with others.



More information about the Comp.unix.sysv386 mailing list