Returns a value indicating wether the given line number is selected or not
(lineIndex: number)
| 120 | |
| 121 | /** Returns a value indicating wether the given line number is selected or not */ |
| 122 | public isSelected(lineIndex: number): boolean { |
| 123 | const lineIsDivergent = |
| 124 | !!this.divergingLines && this.divergingLines.has(lineIndex) |
| 125 | |
| 126 | if (this.defaultSelectionType === DiffSelectionType.All) { |
| 127 | return !lineIsDivergent |
| 128 | } else if (this.defaultSelectionType === DiffSelectionType.None) { |
| 129 | return lineIsDivergent |
| 130 | } else { |
| 131 | return assertNever( |
| 132 | this.defaultSelectionType, |
| 133 | `Unknown base selection type ${this.defaultSelectionType}` |
| 134 | ) |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | /** |
| 139 | * Returns a value indicating whether the range is all selected, partially |
no test coverage detected