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

Function findNextDiff

src/ink/screen.ts:1213–1224  ·  view source on GitHub ↗

* Scan for the next cell that differs between two Int32Arrays. * Returns the number of matching cells before the first difference, * or `count` if all cells match. Tiny and pure for JIT inlining.

(
  a: Int32Array,
  b: Int32Array,
  w0: number,
  count: number,
)

Source from the content-addressed store, hash-verified

1211 * or `count` if all cells match. Tiny and pure for JIT inlining.
1212 */
1213function findNextDiff(
1214 a: Int32Array,
1215 b: Int32Array,
1216 w0: number,
1217 count: number,
1218): number {
1219 for (let i = 0; i < count; i++, w0 += 2) {
1220 const w1 = w0 | 1
1221 if (a[w0] !== b[w0] || a[w1] !== b[w1]) return i
1222 }
1223 return count
1224}
1225
1226/**
1227 * Diff one row where both screens are in bounds.

Callers 1

diffRowBothFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected