(e3, t3)
| 6432 | const i2 = !this._lastSearchOptions || this._didOptionsChange(this._lastSearchOptions, t3); |
| 6433 | this._lastSearchOptions = t3, (t3 == null ? void 0 : t3.decorations) && (void 0 === this._cachedSearchTerm || e3 !== this._cachedSearchTerm || i2) && this._highlightAllMatches(e3, t3); |
| 6434 | const s2 = this._findNextAndSelect(e3, t3); |
| 6435 | return this._fireResults(t3), this._cachedSearchTerm = e3, s2; |
| 6436 | } |
| 6437 | _highlightAllMatches(e3, t3) { |
| 6438 | if (!this._terminal) throw new Error("Cannot use addon until it has been loaded"); |
| 6439 | if (!e3 || 0 === e3.length) return void this.clearDecorations(); |
| 6440 | t3 = t3 || {}, this.clearDecorations(true); |
| 6441 | const i2 = []; |
| 6442 | let s2, r2 = this._find(e3, 0, 0, t3); |
| 6443 | for (; r2 && ((s2 == null ? void 0 : s2.row) !== r2.row || (s2 == null ? void 0 : s2.col) !== r2.col) && !(i2.length >= this._highlightLimit); ) s2 = r2, i2.push(s2), r2 = this._find(e3, s2.col + s2.term.length >= this._terminal.cols ? s2.row + 1 : s2.row, s2.col + s2.term.length >= this._terminal.cols ? 0 : s2.col + 1, t3); |
| 6444 | for (const e4 of i2) { |
| 6445 | const i3 = this._createResultDecoration(e4, t3.decorations); |
| 6446 | i3 && (this._highlightedLines.add(i3.marker.line), this._highlightDecorations.push({ decoration: i3, match: e4, dispose() { |
| 6447 | i3.dispose(); |
| 6448 | } })); |
| 6449 | } |
| 6450 | } |
no test coverage detected