How do I get vi to know my window size?

Paul Fox pgf at brightstareng.com
Tue Sep 19 10:05:13 UTC 2006


 > > So, is it possible to get the terminal size correct when 
 > > using a serial port?
 > 
 > I don't believe it is.  This works with SSH (and Telnet) because
 > ssh supports sending and receiving the terminal size from the client.

right.  the best solution i've come up with is to use (a stripped down
version of) the "resize" program that i believe is, or was, distributed
with xterm.  it uses an ansi query seqeunce to ask the terminal how
big it is, and then sets the tty driver's notion of the size correctly
based on that inforomation.  always works reliably for me.

i have a feeling i may already have posted the code i'm using, or
a reference to it, to the list a while back.  check the archives, or
ask me for a copy -- it's only a few pages long.  for copyright
conflict reasons it can't become an applet, though it would be nifty if
someone would rewrite it so that it could be included in busybox.

paul
=---------------------
 paul fox, pgf at brightstareng.com



More information about the busybox mailing list