MCPcopy Create free account
hub / github.com/codeaashu/claude-code / r2

Method r2

src/server/web/public/terminal.js:113–121  ·  view source on GitHub ↗
({ node: e4, offset: t4 })

Source from the content-addressed store, hash-verified

111 const s3 = this._rowElements.slice(-1)[0];
112 if (i3.node.compareDocumentPosition(s3) & (Node.DOCUMENT_POSITION_CONTAINED_BY | Node.DOCUMENT_POSITION_PRECEDING) && (i3 = { node: s3, offset: ((_a = s3.textContent) == null ? void 0 : _a.length) ?? 0 }), !this._rowContainer.contains(i3.node)) return;
113 const r2 = ({ node: e4, offset: t4 }) => {
114 const i4 = e4 instanceof Text ? e4.parentNode : e4;
115 let s4 = parseInt(i4 == null ? void 0 : i4.getAttribute("aria-posinset"), 10) - 1;
116 if (isNaN(s4)) return console.warn("row is invalid. Race condition?"), null;
117 const r3 = this._rowColumns.get(i4);
118 if (!r3) return console.warn("columns is null. Race condition?"), null;
119 let n3 = t4 < r3.length ? r3[t4] : r3.slice(-1)[0] + 1;
120 return n3 >= this._terminal.cols && (++s4, n3 = 0), { row: s4, column: n3 };
121 }, n2 = r2(t3), o2 = r2(i3);
122 if (n2 && o2) {
123 if (n2.row > o2.row || n2.row === o2.row && n2.column >= o2.column) throw new Error("invalid range");
124 this._terminal.select(n2.column, n2.row, (o2.row - n2.row) * this._terminal.cols - n2.column + o2.column);

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
warnMethod · 0.45

Tested by

no test coverage detected