This object is used in various places to indicate a region within the editor. To better visualize how this works, imagine a rectangle. Each quadrant of the rectangle is analogus to a range, as ranges contain a starting row and starting column, and an ending row, and ending column.
Range[edit]
Constructors
Methods
- Range.clone()
Returns a duplicate of the calling range.
- Range.collapseRows()
Returns a range containing the starting and ending rows of the original range, but with a column value of 0.
Returns true if the row and column provided are within the given range. This can better be expressed as returning true if:
- Range.isMultiLine()
Returns true if the range spans across multiple lines.
- Range.toScreenRange(EditSession session)
Given the current Range, this function converts those starting and ending points into screen positions, and then returns a new Range object.
Arguments
| session | EditSession | Required. The EditSession to retrieve coordinates from |
- Range.toString()
Returns a string containing the range's row and column information, given like this:
[start.row/start.column] -> [end.row/end.column]