Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!sun-barr!newstop!sun!turnpike!argv From: argv%turnpike@Sun.COM (Dan Heller) Newsgroups: comp.windows.x Subject: Re: how does xterm tell vi the window size Keywords: xterm vi Message-ID: <125782@sun.Eng.Sun.COM> Date: 4 Oct 89 17:26:30 GMT References: <253@zeek.UUCP> Sender: news@sun.Eng.Sun.COM Reply-To: argv@sun.UUCP (Dan Heller) Lines: 21 In article <253@zeek.UUCP> rick@zeek.UUCP (Rick Wilhelm) writes: > So my question is two-fold. > 1) (this case) How can we let vi know that the window is _not_ necessarily > 24x80? > 2) (in general) How does vi (or vnews for that matter) find out a window's > size from xterm? you need to use the program (distributed with X) called resize. I have it in my .login and use it like so: if ($TERM == xterm) eval `resize` The nice thing about "resize" is that you don't have to have Xlib to use it. I frequently login to a machine that doesn't run X, but I'm logging in from an xterm. You can copy resize.c to that other machine and edit it commenting out copyright.h and Xos.h. Then compile: cc resize.c -o resize -ltermlib dan ----- My postings reflect my opinion only -- not the opinion of any company.