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

Method _initLinesCache

src/server/web/public/terminal.js:6515–6518  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6513 for (let i3 = s2 - 1; i3 >= 0 && (n2.startRow = i3, h = this._findInLine(e3, n2, t3, o2), !h); i3--) ;
6514 }
6515 if (!h && s2 !== this._terminal.buffer.active.baseY + this._terminal.rows - 1) for (let i3 = this._terminal.buffer.active.baseY + this._terminal.rows - 1; i3 >= s2 && (n2.startRow = i3, h = this._findInLine(e3, n2, t3, o2), !h); i3--) ;
6516 return this._selectResult(h, t3 == null ? void 0 : t3.decorations, t3 == null ? void 0 : t3.noScroll);
6517 }
6518 _initLinesCache() {
6519 const e3 = this._terminal;
6520 this._linesCache || (this._linesCache = new Array(e3.buffer.active.length), this._linesCacheDisposables.value = (0, r.getDisposeArrayDisposable)([e3.onLineFeed((() => this._destroyLinesCache())), e3.onCursorMove((() => this._destroyLinesCache())), e3.onResize((() => this._destroyLinesCache()))])), window.clearTimeout(this._linesCacheTimeoutId), this._linesCacheTimeoutId = window.setTimeout((() => this._destroyLinesCache()), 15e3);
6521 }

Callers 3

_findMethod · 0.95
_findNextAndSelectMethod · 0.95

Calls 4

_destroyLinesCacheMethod · 0.95
onLineFeedMethod · 0.80
onCursorMoveMethod · 0.80
onResizeMethod · 0.80

Tested by

no test coverage detected