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

Function cloneFrameForMutation

src/ink/log-update.ts:1096–1117  ·  view source on GitHub ↗
(frame: Frame, stylePool: StylePool)

Source from the content-addressed store, hash-verified

1094}
1095
1096function cloneFrameForMutation(frame: Frame, stylePool: StylePool): Frame {
1097 const source = frame.screen
1098 const screen = createScreen(
1099 source.width,
1100 source.height,
1101 stylePool,
1102 source.charPool,
1103 source.hyperlinkPool,
1104 )
1105 screen.cells.set(source.cells)
1106 screen.noSelect.set(source.noSelect)
1107 screen.softWrap.set(source.softWrap)
1108 screen.contentEnd.set(source.contentEnd)
1109 if (source.damage) {
1110 screen.damage = { ...source.damage }
1111 }
1112
1113 return {
1114 ...frame,
1115 screen,
1116 }
1117}
1118
1119function clipMainScreenFrameToVisibleRows(
1120 frame: Frame,

Callers 1

renderMethod · 0.85

Calls 2

createScreenFunction · 0.85
setMethod · 0.80

Tested by

no test coverage detected