[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: vi question



On 29 Mar 1999, in message <002d01be79ef$0000a720$0208879e ford wss edu>
  "Rick Henderson" <rhenderson alpha1 net> wrote:
| =>I am using tun8.61 to telnet into my redhat 5.2 box.  I have copied the
| SCO
| =>ansi terminfo and termcap.  Everythings seems to work okay except that vi
| =>does not redraw properly when going down past the 25th line or so,
| pressing
| =><enter>.  It leaves the first lines the same and redraw the 25th line
| (might
| =>be the 24th).  I am using sco ansi terminal emulator.

From:	Steven W Orr [mailto:steveo world std com]
| You need to set the number of lines for your terminal. e.g., export
| LINES=72

Rick again:
| I  exported the lines and it seems to work great.

If your emulator is sufficiently complete, try unsetting the LINES
variable altogether. In principle vi can query the terminal for the
_current_ window size, and the telnet protocol has mechanisms for
propagating the window size through to the far end so it knows.

However, if LINES is set vi won't ask the terminal since it presumes
you had good reason to override those settings.

I've noticed recently that bash seems to have some fetish for setting
LINES which break vi and less etc in just this fashion. I haven't
finished tracking it down yet, but forcibly unsetting LINES in my
.bashrc has made lots of things start working properly again.

The LINES variable is a workaround for systems which aren't smart
enough to keep the terminal's idea of its size correct. It should _not_
used as routine, only in extremis.

It may be that your telnet client doesn't pass the correct sizes
through to the linux box, in which case your LINES setting is a
perfectly correct thing to do to get things going (equally, and perhaps
better, "stty rows 72" would serve, since it would set the terminal's
idea of the size). However, if your telnet client does propagate size
info, then setting LINES just stops that info being used.

Cheers,
--
Cameron Simpson, DoD#743        cs zip com au    http://www.zip.com.au/~cs/

Jesus saves sinners ... and redeems them for valuable cash prizes!!!



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]