MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / findNextDiff

Function findNextDiff

source code/ink/screen.ts:1215–1226  ·  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

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

Callers 1

diffRowBothFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected