Module: util/rangeUtils
Functions
expandToFullLine
▸ expandToFullLine(editor
, range
): Range
Expands the given range to in the full line(s) containing it, including leading and trailing white space.
Parameters
Name | Type | Description |
---|---|---|
editor | TextEditor | The editor |
range | Range | The range to expand |
Returns
The expanded range
Defined in
util/rangeUtils.ts:21
getRangeLength
▸ getRangeLength(editor
, range
): number
Parameters
Name | Type |
---|---|
editor | TextEditor |
range | Range |
Returns
number
Defined in
util/rangeUtils.ts:28
isAtEndOfLine
▸ isAtEndOfLine(editor
, position
): boolean
Parameters
Name | Type |
---|---|
editor | TextEditor |
position | Position |
Returns
boolean
Defined in
util/rangeUtils.ts:3
isAtStartOfLine
▸ isAtStartOfLine(position
): boolean
Parameters
Name | Type |
---|---|
position | Position |
Returns
boolean
Defined in
util/rangeUtils.ts:9
strictlyContains
▸ strictlyContains(range1
, rangeOrPosition
): boolean
Returns
range1.start < range2.start && range1.end > range2.end
Parameters
Name | Type | Description |
---|---|---|
range1 | Range | One of the ranges to compare |
rangeOrPosition | Range | Position | The other range or position to compare |
Returns
boolean
A boolean indicating whether {@link range1} completely contains {@link rangeOrPosition} without it touching either boundary
Defined in
util/rangeUtils.ts:46