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

Function isEmptyCellByIndex

src/ink/screen.ts:417–422  ·  view source on GitHub ↗
(screen: Screen, index: number)

Source from the content-addressed store, hash-verified

415}
416
417function isEmptyCellByIndex(screen: Screen, index: number): boolean {
418 // An empty/unwritten cell has both words === 0:
419 // word0 = EMPTY_CHAR_INDEX (0), word1 = packWord1(emptyStyleId=0, 0, 0) = 0.
420 const ci = index << 1
421 return screen.cells[ci] === 0 && screen.cells[ci | 1] === 0
422}
423
424export function isEmptyCellAt(screen: Screen, x: number, y: number): boolean {
425 if (x < 0 || y < 0 || x >= screen.width || y >= screen.height) return true

Callers 1

isEmptyCellAtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected