Attribute Used to Clear the Screen

The screen clear function, vs_clr(), normally sets the background according to the attribute contained in the screen clear attribute global variable. This global is initially set in vv_init() to LSYS. The screen clear attribute can be changed with a call to vs_clratt().

Note that some terminals support a clear screen escape sequence. If your terminal supports this command, and if you have specified the correct escape sequence in vvtermcap, Vermont Views will use this escape sequence to clear the screen if possible. This hardware-supported command is much faster than writing blanks to the screen. However, some terminals always clear the screen using a particular color (usually the default color specified in LSYS). Other terminals allow the programmer to specify the attribute to use with the clear screen escape sequence. If you have changed the screen clear attribute, or if Vermont Views is trying to repaint a window that does not use the screen clear attribute, Vermont Views checks the terminal type. If this terminal type allows different attributes for its clear screen command, Vermont Views will set the attribute to the one that you specified and issue the clear screen escape sequence. Otherwise, Vermont Views is forced to issue enough spaces to fill the screen with the requested attribute, instead of using the clear screen escape sequence.


Home Contents Previous Next