MCPcopy Create free account
hub / github.com/Noumena-Network/code / cellAtCI

Function cellAtCI

src/ink/screen.ts:883–891  ·  view source on GitHub ↗

* Write cell data into an existing Cell object to avoid allocation. * Caller must ensure index is valid.

(screen: Screen, ci: number, out: Cell)

Source from the content-addressed store, hash-verified

881 * Caller must ensure index is valid.
882 */
883function cellAtCI(screen: Screen, ci: number, out: Cell): void {
884 const w1 = ci | 1
885 const word1 = screen.cells[w1]!
886 out.char = screen.charPool.get(screen.cells[ci]!)
887 out.styleId = word1 >>> STYLE_SHIFT
888 out.width = word1 & WIDTH_MASK
889 const hid = (word1 >>> HYPERLINK_SHIFT) & HYPERLINK_MASK
890 out.hyperlink = hid === 0 ? undefined : screen.hyperlinkPool.get(hid)
891}
892
893export function charInCellAt(
894 screen: Screen,

Callers 4

diffRowBothFunction · 0.85
diffRowRemovedFunction · 0.85
diffRowAddedFunction · 0.85
diffDifferentWidthFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected