A range in the editor. (startLineNumber,startColumn) is <= (endLineNumber,endColumn)

Hierarchy (view full)

Constructors

  • Parameters

    • startLineNumber: number
    • startColumn: number
    • endLineNumber: number
    • endColumn: number

    Returns Range

Properties

endColumn: number

Column on which the range ends in line endLineNumber.

endLineNumber: number

Line number on which the range ends.

startColumn: number

Column on which the range starts in line startLineNumber (starts at 1).

startLineNumber: number

Line number on which the range starts (starts at 1).

Methods

  • Create a new empty range using this range's end position.

    Returns Range

  • Create a new empty range using this range's start position.

    Returns Range

  • Test if position is in this range. If the position is at the edges, will return true.

    Parameters

    Returns boolean

  • Test if range is in this range. If the range is equal to this range, will return true.

    Parameters

    Returns boolean

  • Moves the range by the given amount of lines.

    Parameters

    • lineCount: number

    Returns Range

  • Test if this range equals other.

    Parameters

    Returns boolean

  • Return the end position (which will be after or equal to the start position)

    Returns Position

  • Return the start position (which will be before or equal to the end position)

    Returns Position

  • A intersection of the two ranges.

    Parameters

    Returns Range

  • Test if this range is empty.

    Returns boolean

  • A reunion of the two ranges. The smallest position will be used as the start point, and the largest one as the end point.

    Parameters

    Returns Range

  • Create a new range using this range's start position, and using endLineNumber and endColumn as the end position.

    Parameters

    • endLineNumber: number
    • endColumn: number

    Returns Range

  • Create a new range using this range's end position, and using startLineNumber and startColumn as the start position.

    Parameters

    • startLineNumber: number
    • startColumn: number

    Returns Range

  • Test if range is strictly in this range. range must start after and end before this range for the result to be true.

    Parameters

    Returns boolean

  • Returns IRange

  • Transform to a user presentable string representation.

    Returns string

  • Test if the two ranges are intersecting. If the ranges are touching it returns true.

    Parameters

    Returns boolean

  • Test if the two ranges are touching in any way.

    Parameters

    Returns boolean

  • Create a new empty range using this range's end position.

    Parameters

    Returns Range

  • Create a new empty range using this range's start position.

    Parameters

    Returns Range

  • A function that compares ranges, useful for sorting ranges It will first compare ranges on the endPosition and then on the startPosition

    Parameters

    Returns number

  • A function that compares ranges, useful for sorting ranges It will first compare ranges on the startPosition and then on the endPosition

    Parameters

    Returns number

  • Test if position is in range. If the position is at the edges, will return true.

    Parameters

    Returns boolean

  • Test if otherRange is in range. If the ranges are equal, will return true.

    Parameters

    Returns boolean

  • Test if range a equals b.

    Parameters

    Returns boolean

  • Return the end position (which will be after or equal to the start position)

    Parameters

    Returns Position

  • Return the start position (which will be before or equal to the end position)

    Parameters

    Returns Position

  • A intersection of the two ranges.

    Parameters

    Returns Range

  • Test if range is empty.

    Parameters

    Returns boolean

  • Test if obj is an IRange.

    Parameters

    • obj: any

    Returns obj is IRange

  • Create a Range from an IRange.

    Parameters

    • range: null

    Returns null

  • Parameters

    Returns Range

  • Parameters

    Returns Range

  • A reunion of the two ranges. The smallest position will be used as the start point, and the largest one as the end point.

    Parameters

    Returns Range

  • Test if the range spans multiple lines.

    Parameters

    Returns boolean

  • Test if otherRange is strictly in range (must start after, and end before). If the ranges are equal, will return false.

    Parameters

    Returns boolean