goto-line - Move the cursor to specified line
n goto-line (esc g)
goto-line "num"
goto-line moves the cursor to the specified line in the buffer. The user is prompted for the new line number on the command line, which may be entered as a relative displacement ([+|-]number) from the current position, or as an absolute line number (number). If the number is preceded by + or - then this is treated as a relative displacement from the current line, otherwise it is an absolute line number.
If a +ve argument n is supplied, goto-line moves to this line, e.g. to move the cursor to line 240:
240 goto-line
A special case of goto-line is operative if an argument of 0 is supplied, argument "num" must also be given as above except goto-line treats the line number or displacement as an absolute move, i.e. includes narrowed out sections when calculating the new position. If the new line lies within a narrowed out section (i.e. a section that has been hidden and is not visible on the screen) the narrow is automatically expanded. See narrow-buffer(2) for more information on narrowing.
Supplying a -ve argument to goto-line results in an error.
After successfully calling goto-line, variable $window-line(5) is set to the required line number if a +ve or no argument was supplied, or variable $window-wline(5) is set to the required line number if an argument of 0 was supplied.
(c) Copyright JASSPA 1999
Last Modified: 1999/01/29
Generated On: 1999/12/01