Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!ginosko!uunet!husc6!frooz!cfa.HARVARD.EDU From: mink@cfa.HARVARD.EDU (Doug Mink, OIR) Newsgroups: comp.windows.x Subject: Re: how does xterm tell vi the window size Message-ID: <214@cfa.HARVARD.EDU> Date: 5 Oct 89 15:32:02 GMT References: <125782@sun.Eng.Sun.COM> Sender: news@cfa.HARVARD.EDU 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? 1) run eval `resize` 2) The resize program adds a TERMCAP entry to the xterm's environment. tgetint in the libtermcap.a library checks to see whether there is a TERMCAP in the environment before reading the terminal's entry in /etc/termcap. resize sets the "co" and "li" entries which can be read with tgetnum. Doug Mink Harvard-Smithsonian Center for Astrophysics Cambridge, Massachusetts Internet: mink@cfa.harvard.edu BITNET: mink@cfa