| 6412 | super(), this._highlightedLines = /* @__PURE__ */ new Set(), this._highlightDecorations = [], this._selectedDecoration = this.register(new r.MutableDisposable()), this._linesCacheTimeoutId = 0, this._linesCacheDisposables = new r.MutableDisposable(), this._onDidChangeResults = this.register(new t2.EventEmitter()), this.onDidChangeResults = this._onDidChangeResults.event, this._highlightLimit = (e3 == null ? void 0 : e3.highlightLimit) ?? 1e3; |
| 6413 | } |
| 6414 | activate(e3) { |
| 6415 | this._terminal = e3, this.register(this._terminal.onWriteParsed((() => this._updateMatches()))), this.register(this._terminal.onResize((() => this._updateMatches()))), this.register((0, r.toDisposable)((() => this.clearDecorations()))); |
| 6416 | } |
| 6417 | _updateMatches() { |
| 6418 | var _a; |
| 6419 | this._highlightTimeout && window.clearTimeout(this._highlightTimeout), this._cachedSearchTerm && ((_a = this._lastSearchOptions) == null ? void 0 : _a.decorations) && (this._highlightTimeout = setTimeout((() => { |
| 6420 | const e3 = this._cachedSearchTerm; |
| 6421 | this._cachedSearchTerm = void 0, this.findPrevious(e3, { ...this._lastSearchOptions, incremental: true, noScroll: true }); |
| 6422 | }), 200)); |
| 6423 | } |