Left for backward compatibility
Left for backward compatibility
Sets the row and column position of the anchor. This function also emits the 'changeSelection' event.
The new row
The new column
[Empties the selection (by de-selecting it). This function also emits the 'changeSelection' event.]{: #Selection.clearSelection}
[Returns the [[Range]] for the selected text.]{: #Selection.getRange}
Saves the current cursor position and calls func that can change the cursor
postion. The result is the range of the starting and eventual cursor position.
Will reset the cursor position.
The callback that should change the cursor position
Returns an object containing the row and column of the calling selection lead.
Moves the selection to highlight the entire word.
Returns true if the selection is going backwards in the document.
Returns true if the selection is empty.
Returns true if the selection is a multi-line.
Moves the cursor to position indicated by the parameters. Negative numbers move the cursor backwards in the document.
The number of rows to move by
The number of characters to move by
Moves the cursor down one row.
Moves the cursor to the end of the file.
Moves the cursor to the start of the file.
Moves the cursor left one column.
Moves the cursor to the end of the line.
Moves the cursor to the start of the line.
Moves the cursor to the word on the left.
Moves the cursor to the word on the right.
Moves the cursor right one column.
Moves the cursor to the row and column provided. [If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.]{: #preventUpdateBoolDesc}
The row to move to
The column to move to
OptionalkeepDesiredColumn: boolean[If true, the cursor move does not respect the previous column]{: #preventUpdateBool}
Moves the cursor to the screen position indicated by row and column. {:preventUpdateBoolDesc}
The row to move to
The column to move to
{:preventUpdateBool}
Moves the cursor up one row.
Moves the selection cursor to the indicated row and column.
The row to select to
The column to select to
Moves the selection cursor to the row and column indicated by pos.
An object containing the row and column
Selects all the text in the document.
Selects a word, including its right whitespace.
Moves the selection down one row.
Moves the selection to the end of the file.
Moves the selection to the start of the file.
Moves the selection left one column.
Selects the entire line.
Moves the selection to the end of the current line.
Moves the selection to the beginning of the current line.
Moves the selection right one column.
Moves the selection cursor to the indicated row and column.
The row to select to
The column to select to
Moves the selection up one row.
Selects an entire word boundary.
Moves the selection to the first word on the left.
Moves the selection to the first word on the right.
Sets the row and column position of the anchor. This function also emits the 'changeSelection' event.
The new row
The new column
Optionalrange: Range & { desiredColumn?: number }
Creates a new
Selectionobject.