Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TextEditorDocument

Hierarchy

  • TextDocument
  • Saveable
  • Disposable
    • TextEditorDocument

Index

Methods

  • getLineContent(lineNumber: number): string
  • getLineMaxColumn(lineNumber: number): number
  • toValidPosition(position: Position): Position
  • Creates a valid position. If the position is outside of the backing document, this method will return a position that is ensured to be inside the document and valid. For example, when the position is { line: 1, character: 0 } and the document is empty, this method will return with { line: 0, character: 0 }.

    Parameters

    • position: Position

    Returns Position

  • toValidRange(range: Range): Range
  • Creates a valid range. If the range argument is outside of the document, this method will return with a new range that does not exceed the boundaries of the document. For example, if the argument is { start: { line: 1, character: 0 }, end: { line: 1, character: 0 } } and the document is empty, the return value is { start: { line: 0, character: 0 }, end: { line: 0, character: 0 } }.

    Parameters

    • range: Range

    Returns Range