Module: util/selectionUtils
Functions
selectionWithEditorFromRange
▸ selectionWithEditorFromRange(selection, range): SelectionWithEditor
Parameters
| Name | Type |
|---|---|
selection | SelectionWithEditor |
range | Range |
Returns
Defined in
shrinkRangeToFitContent
▸ shrinkRangeToFitContent(editor, range): Range
Return a copy of range excluding any leading or trailing whitespace. If range contains only whitespace or is empty range will be returned unchanged.
Parameters
| Name | Type | Description |
|---|---|---|
editor | TextEditor | The text editor to use |
range | Range | The range to shrink down |
Returns
A new range equal or smaller to range