# $scroll(5)

[Home] [Commands] [Variables] [Macro-Dev] [Glossary]

## NAME

$scroll - Screen scroll control

## SYNOPSIS

`$scroll` scrollNum; Default is `1`

0 <= scrollNum <= n

## DESCRIPTION

$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:

`0x00`

Scroll method 0 will only scroll the current line, this is the fastest method in execution time.

`0x01`

Scroll method 1 (the default) will scroll the whole page horizontally when the scroll-left(2) and 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.

`0x02`

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.

`0x03`

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:

`0x00`

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.

`0x10`

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.

## EXAMPLE

The following example sets the scrolling method to be the default horizontally (`0x01`) and smooth method (`0x10`) vertically :

    set-variable $scroll 0x11

## SEE ALSO

scroll-left(2), forward-line(2), $window-x-scroll(5), $window-y-scroll(5).

(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12

</HMTL>