Create a selection from two positions.
Create a selection from coordinates.
a zero based line value
a zero based character value
a zero based line value
a zero based character value
Readonly
activeThe position of the cursor. This position might be before or after anchor.
Readonly
anchorThe position at which the selection starts. This position might be before or after active.
Readonly
endEnd position.
true
if start and end are equal
Readonly
istrue
if start.line
and end.line
are equal
Readonly
startStart position.
Check other
equals this range.
a range
Derived a new range from this range.
Optional
start: PositionA position that should be used as start. The default value is the current start.
Optional
end: PositionA position that should be used as end. The default value is the current end.
A range derived from this range with the given start and end position.
If start and end are not different this
range will be returned.
Derived a new range from this range.
A range that reflects the given change. Will return this
range if the change
is not changing anything.
Represents a text selection in an editor.