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

Method _findNextAndSelect

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

Source from the content-addressed store, hash-verified

6456 this._initLinesCache();
6457 const o2 = { startRow: t3, startCol: i2 };
6458 if (r2 = this._findInLine(e3, o2, s2), !r2) for (let i3 = t3 + 1; i3 < this._terminal.buffer.active.baseY + this._terminal.rows && (o2.startRow = i3, o2.startCol = 0, r2 = this._findInLine(e3, o2, s2), !r2); i3++) ;
6459 return r2;
6460 }
6461 _findNextAndSelect(e3, t3) {
6462 var _a;
6463 if (!this._terminal || !e3 || 0 === e3.length) return (_a = this._terminal) == null ? void 0 : _a.clearSelection(), this.clearDecorations(), false;
6464 const i2 = this._terminal.getSelectionPosition();
6465 this._terminal.clearSelection();
6466 let s2 = 0, r2 = 0;
6467 i2 && (this._cachedSearchTerm === e3 ? (s2 = i2.end.x, r2 = i2.end.y) : (s2 = i2.start.x, r2 = i2.start.y)), this._initLinesCache();
6468 const o2 = { startRow: r2, startCol: s2 };
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 }

Callers 1

findNextMethod · 0.95

Calls 6

clearDecorationsMethod · 0.95
_initLinesCacheMethod · 0.95
_findInLineMethod · 0.95
_selectResultMethod · 0.95
clearSelectionMethod · 0.45
getSelectionPositionMethod · 0.45

Tested by

no test coverage detected