Module: util/selectionUtils
Functions
selectionWithEditorFromRange
▸ selectionWithEditorFromRange(selection
, range
): SelectionWithEditor
Parameters
Name | Type |
---|---|
selection | SelectionWithEditor |
range | Range |
Returns
Defined in
util/selectionUtils.ts:4
shrinkRangeToFitContent
▸ shrinkRangeToFitContent(editor
, range
): Range
Return a copy of {@link range} excluding any leading or trailing whitespace. If {@link range} contains only whitespace or is empty {@link 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 {@link range}
Defined in
util/selectionUtils.ts:39