()
| 1605 | return this.isSelectAllActive ? [0, 0] : this.selectionEnd && this.selectionStart && this.areSelectionValuesReversed() ? this.selectionEnd : this.selectionStart; |
| 1606 | } |
| 1607 | get finalSelectionEnd() { |
| 1608 | if (this.isSelectAllActive) return [this._bufferService.cols, this._bufferService.buffer.ybase + this._bufferService.rows - 1]; |
| 1609 | if (this.selectionStart) { |
| 1610 | if (!this.selectionEnd || this.areSelectionValuesReversed()) { |
| 1611 | const e3 = this.selectionStart[0] + this.selectionStartLength; |
| 1612 | return e3 > this._bufferService.cols ? e3 % this._bufferService.cols == 0 ? [this._bufferService.cols, this.selectionStart[1] + Math.floor(e3 / this._bufferService.cols) - 1] : [e3 % this._bufferService.cols, this.selectionStart[1] + Math.floor(e3 / this._bufferService.cols)] : [e3, this.selectionStart[1]]; |
| 1613 | } |
| 1614 | if (this.selectionStartLength && this.selectionEnd[1] === this.selectionStart[1]) { |
| 1615 | const e3 = this.selectionStart[0] + this.selectionStartLength; |
| 1616 | return e3 > this._bufferService.cols ? [e3 % this._bufferService.cols, this.selectionStart[1] + Math.floor(e3 / this._bufferService.cols)] : [Math.max(e3, this.selectionEnd[0]), this.selectionEnd[1]]; |
| 1617 | } |
| 1618 | return this.selectionEnd; |
| 1619 | } |
| 1620 | } |
| 1621 | areSelectionValuesReversed() { |
| 1622 | const e3 = this.selectionStart, t3 = this.selectionEnd; |
| 1623 | return !(!e3 || !t3) && (e3[1] > t3[1] || e3[1] === t3[1] && e3[0] > t3[0]); |
nothing calls this directly
no test coverage detected