split screen on VT220
Alastair Milne
milne at ics.uci.edu
Fri May 12 18:53:24 AEST 1989
ssi at usfvax2.EDU (Ssi) writes
> I'm trying to get a simple split screen utility working on a VT220
>running in VT100 mode. I've created a termcap entry for the
>top half and bottom half of the screen to set scroll region,
>number of lines etc.
> I have an alias to envoke the termcap entry and move the cursor.
>The problem is that `vi' clears to bottom of screen when it
>has to scroll the top `window' up, and in the bottom `window'
>when I try to cursor up past line one of the file the cursor
>jumps to the top of screen, not to line 13 where the origin mode
>(DECOM) is set??
I can think of 2 things:
- remove the "cl" capacity from your termcaps, so "vi" is forced to
clear the screen by a more explicit method, hopefully line by line.
(Other possibility: I seem to recall that the VT100 has separate
sequences for "clear from beginning of screen to cursor" and for "clear
from cursor to end of screen". If so, you could just include in the
"cl" sequence for each termcap the "cm" sequence to move to the
respective end of the window, and then the right clearing sequence.)
- You may also need to add into your "cm" entry for the bottom window the
offset to the top of the bottom window (likewise for its scrolling
region capabilities and anything else that specifies a row number, or vi
will wind up resetting them at the top of the screen when it's finished
with them).
(It would be easier if you could specify a top line for the screen, but
I've never seen a termcap field for doing that.)
Hope this helps,
Alastair Milne
More information about the Comp.unix.questions
mailing list