Go to the previous, next section.
The line functions in the previous section count text lines, delimited only by newline characters. By contrast, these functions count screen lines, which are defined by the way the text appears on the screen. A text line is a single screen line if it is short enough to fit the width of the selected window, but otherwise it may occupy several screen lines.
In some cases, text lines are truncated on the screen rather than
continued onto additional screen lines. Then vertical-motion
moves point just like forward-line. See section Truncation.
Because the width of a given string depends on the flags which control
the appearance of certain characters, vertical-motion will behave
differently on a given piece of text found in different buffers. It
will even act differently in different windows showing the same buffer,
because the width may differ and so may the truncation flag.
See section Usual Display Conventions.
Function: vertical-motion count
This function moves point to the start of the screen line count screen lines down from the screen line containing point. If count is negative, it moves up instead.
This function returns the number of lines moved. The value may be less in absolute value than count if the beginning or end of the buffer was reached.
Command: move-to-window-line count
This function moves point with respect to the text currently displayed in the selected window. Point is moved to the beginning of the screen line count screen lines from the top of the window. If count is negative, point moves either to the beginning of the line -count lines from the bottom or else to the last line of the buffer if the buffer ends above the specified screen position.
If count is nil, then point moves to the beginning of the
line in the middle of the window. If the absolute value of count
is greater than the size of the window, then point moves to the place
which would appear on that screen line if the window were tall enough.
This will probably cause the next redisplay to scroll to bring that
location onto the screen.
In an interactive call, count is the numeric prefix argument.
The value returned is the window line number, with the top line in the window numbered 0.
Go to the previous, next section.