$scroll controls the horizontal and vertical scrolling method used to display long lines and buffers. The variable is split into two componants, the first nibble (0x0f) sets the horizontal scroll, and the second nibble (0xf0) sets the vertical. For the purpose of documentation these parts are kept separate, but when setting the variable a single combined value must be given.
The horizontal settings are defined as follows:
Scroll method 0 will only scroll the current line, this is the fastest method in execution time.
Scroll method 1 (the default) will scroll the whole page horizontally when the
scroll-right(2) commands are used. However, when the current line must be scrolled to display the cursor due to a
forward-char(2) type cursor movement, only the current line is scrolled and the rest are reset.
Scroll method 2 always scrolls the whole page horizontally, keeping the cursor in the current column range. If the cursor moves out of this range then all the page is scrolled to the new position. This is particularly useful when editing long lined tables.
Scroll method 3 fixes the scroll column using the scroll-left and scroll-right functions. If the current cursor position is not visible in the column range then only the current line is scrolled to the new position.
The vertical settings are defined as follows:
Scroll method 0 (the default) will scroll the current line to the middle of the current window whenver it is moved off screen, this is the fastest method in execution time.
Scroll method 1 will scroll the current line to the the top of the window whenver the current line is moved off the screen using
backward-line(2) and to the bottom of the window when
forward-line(2) is used. This creates the effect of a smooth scroll.
The following example sets the scrolling method to be the default horizontally (0x01) and smooth method (0x10) vertically :
set-variable $scroll 0x11
Copyright (c) 1998-2006 JASSPA
Last Modified: 2002/01/11
Generated On: 2006/10/07