MCPcopy Index your code
hub / github.com/codeaashu/claude-code / findPrevious

Method findPrevious

src/server/web/public/terminal.js:6471–6477  ·  view source on GitHub ↗
(e3, t3)

Source from the content-addressed store, hash-verified

6469 let n2 = this._findInLine(e3, o2, t3);
6470 if (!n2) for (let i3 = r2 + 1; i3 < this._terminal.buffer.active.baseY + this._terminal.rows && (o2.startRow = i3, o2.startCol = 0, n2 = this._findInLine(e3, o2, t3), !n2); i3++) ;
6471 if (!n2 && 0 !== r2) for (let i3 = 0; i3 < r2 && (o2.startRow = i3, o2.startCol = 0, n2 = this._findInLine(e3, o2, t3), !n2); i3++) ;
6472 return !n2 && i2 && (o2.startRow = i2.start.y, o2.startCol = 0, n2 = this._findInLine(e3, o2, t3)), this._selectResult(n2, t3 == null ? void 0 : t3.decorations, t3 == null ? void 0 : t3.noScroll);
6473 }
6474 findPrevious(e3, t3) {
6475 if (!this._terminal) throw new Error("Cannot use addon until it has been loaded");
6476 const i2 = !this._lastSearchOptions || this._didOptionsChange(this._lastSearchOptions, t3);
6477 this._lastSearchOptions = t3, (t3 == null ? void 0 : t3.decorations) && (void 0 === this._cachedSearchTerm || e3 !== this._cachedSearchTerm || i2) && this._highlightAllMatches(e3, t3);
6478 const s2 = this._findPreviousAndSelect(e3, t3);
6479 return this._fireResults(t3), this._cachedSearchTerm = e3, s2;
6480 }

Callers 1

_updateMatchesMethod · 0.95

Calls 4

_didOptionsChangeMethod · 0.95
_highlightAllMatchesMethod · 0.95
_fireResultsMethod · 0.95

Tested by

no test coverage detected