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

Method _stringRangesToCellRanges

src/server/web/public/terminal.js:1776–1791  ·  view source on GitHub ↗
(e4, t3, i3)

Source from the content-addressed store, hash-verified

1774 return this._stringRangesToCellRanges(a2, r2, n2), a2;
1775 }
1776 _stringRangesToCellRanges(e4, t3, i3) {
1777 let s3 = 0, r2 = false, n2 = 0, a2 = e4[s3];
1778 if (a2) {
1779 for (let h2 = i3; h2 < this._bufferService.cols; h2++) {
1780 const i4 = t3.getWidth(h2), c2 = t3.getString(h2).length || o.WHITESPACE_CELL_CHAR.length;
1781 if (0 !== i4) {
1782 if (!r2 && a2[0] <= n2 && (a2[0] = h2, r2 = true), a2[1] <= n2) {
1783 if (a2[1] = h2, a2 = e4[++s3], !a2) break;
1784 a2[0] <= n2 ? (a2[0] = h2, r2 = true) : r2 = false;
1785 }
1786 n2 += c2;
1787 }
1788 }
1789 a2 && (a2[1] = this._bufferService.cols);
1790 }
1791 }
1792 static _mergeRanges(e4, t3) {
1793 let i3 = false;
1794 for (let s3 = 0; s3 < e4.length; s3++) {

Callers 1

_getJoinedRangesMethod · 0.95

Calls 2

getStringMethod · 0.80
getWidthMethod · 0.45

Tested by

no test coverage detected