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

Method _bufferColsToStringOffset

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

Source from the content-addressed store, hash-verified

6560 const o2 = i2.getCell(e4 + 1);
6561 o2 && 0 === o2.getWidth() && t3++;
6562 }
6563 return t3;
6564 }
6565 _bufferColsToStringOffset(e3, t3) {
6566 const i2 = this._terminal;
6567 let s2 = e3, r2 = 0, o2 = i2.buffer.active.getLine(s2);
6568 for (; t3 > 0 && o2; ) {
6569 for (let e4 = 0; e4 < t3 && e4 < i2.cols; e4++) {
6570 const t4 = o2.getCell(e4);
6571 if (!t4) break;
6572 t4.getWidth() && (r2 += 0 === t4.getCode() ? 1 : t4.getChars().length);
6573 }
6574 if (s2++, o2 = i2.buffer.active.getLine(s2), o2 && !o2.isWrapped) break;
6575 t3 -= i2.cols;
6576 }
6577 return r2;
6578 }

Callers 1

_findInLineMethod · 0.95

Calls 5

getCellMethod · 0.80
getLineMethod · 0.45
getWidthMethod · 0.45
getCodeMethod · 0.45
getCharsMethod · 0.45

Tested by

no test coverage detected