Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a text selection in an editor.

Hierarchy

Index

Constructors

  • new Selection(anchor: Position, active: Position): Selection
  • new Selection(anchorLine: number, anchorCharacter: number, activeLine: number, activeCharacter: number): Selection

Properties

active: Position

Position of the cursor

anchor: Position

Position where selection starts.

End position.

isEmpty: boolean

true if start and end are equal

isReversed: boolean

A selection is reversed if active.isBefore(anchor)

isSingleLine: boolean

true if start.line and end.line are equal

start: Position

Start position.

Methods

  • isEqual(other: Range): boolean