Editor.setSelection method
Editor › setSelection
Official
Set the selection.Signature:
setSelection(anchor: EditorPosition, head?: EditorPosition | undefined): voidParameters:
| Parameter | Type | Description |
|---|---|---|
| anchor | EditorPosition | The start selection position. |
| head? | EditorPosition | undefined | The end selection position. |
Returns: void
Since: 0.11.11
Example:
editor.setSelection({ line: 12, ch: 3 }, { line: 23, ch: 4 });