-being refreshed. The \fBleaveok\fR option allows the cursor to be left
-wherever the update happens to leave it. It is useful for applications where
-the cursor is not used, since it reduces the need for cursor motions. If
-possible, the cursor is made invisible when this option is enabled.
-
-The \fBsetscrreg\fR and \fBwsetscrreg\fR routines allow the application
-programmer to set a software scrolling region in a window. \fItop\fR and
-\fIbot\fR are the line numbers of the top and bottom margin of the scrolling
-region. (Line 0 is the top line of the window.) If this option and
-\fBscrollok\fR are enabled, an attempt to move off the bottom margin line
+being refreshed.
+The \fBleaveok\fP option allows the cursor to be left
+wherever the update happens to leave it.
+It is useful for applications where
+the cursor is not used, since it reduces the need for cursor motions.
+.SS scrollok
+The \fBscrollok\fP option controls what happens when the cursor of a window is
+moved off the edge of the window or scrolling region, either as a result of a
+newline action on the bottom line, or typing the last character of the last
+line.
+If disabled, (\fIbf\fP is \fBFALSE\fP), the cursor is left on the bottom
+line.
+If enabled, (\fIbf\fP is \fBTRUE\fP), the window is scrolled up one line
+(Note that to get the physical scrolling effect on the terminal, it is
+also necessary to call \fBidlok\fP).
+.SS "setscrreg, wsetscrreg"
+The \fBsetscrreg\fP and \fBwsetscrreg\fP routines allow the application
+programmer to set a software scrolling region in a window.
+The \fItop\fP and
+\fIbot\fP parameters
+are the line numbers of the top and bottom margin of the scrolling
+region.
+(Line 0 is the top line of the window.) If this option and
+\fBscrollok\fP are enabled, an attempt to move off the bottom margin line