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

Function cellAtIndex

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

Source from the content-addressed store, hash-verified

600 * index computation — caller must ensure index is valid.
601 */
602export function cellAtIndex(screen: Screen, index: number): Cell {
603 const ci = index << 1
604 const word1 = screen.cells[ci + 1]!
605 const hid = (word1 >>> HYPERLINK_SHIFT) & HYPERLINK_MASK
606 return {
607 // Unwritten cells have charIndex=0 (EMPTY_CHAR_INDEX); charPool.get(0) returns ' '
608 char: screen.charPool.get(screen.cells[ci]!),
609 styleId: word1 >>> STYLE_SHIFT,
610 width: word1 & WIDTH_MASK,
611 hyperlink: hid === 0 ? undefined : screen.hyperlinkPool.get(hid),
612 }
613}
614
615/**
616 * Get a Cell at the given index, or undefined if it has no visible content.

Callers 5

scanPositionsFunction · 0.85
applyPositionedHighlightFunction · 0.85
applySelectionOverlayFunction · 0.85
applySearchHighlightFunction · 0.85
cellAtFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected