Editor.scrollIntoView method
Editor › scrollIntoView
Official
Scroll into view.Signature:
scrollIntoView(range: EditorRange, center?: boolean | undefined): voidParameters:
| Parameter | Type | Description |
|---|---|---|
| range | EditorRange | The range to scroll into view. |
| center? | boolean | undefined | Whether to center the range. |
Returns: void
Since: 0.13.0
Example:
editor.scrollIntoView({ from: { line: 12, ch: 3 }, to: { line: 23, ch: 4 } }, true);