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

Function fullRepaintFromPreviousOutputTop

src/ink/log-update.ts:1044–1065  ·  view source on GitHub ↗
(
  prev: Frame,
  frame: Frame,
  stylePool: StylePool,
  options?: {
    clearRowsBeforeWrite?: boolean
  },
)

Source from the content-addressed store, hash-verified

1042}
1043
1044function fullRepaintFromPreviousOutputTop(
1045 prev: Frame,
1046 frame: Frame,
1047 stylePool: StylePool,
1048 options?: {
1049 clearRowsBeforeWrite?: boolean
1050 },
1051): Diff {
1052 const screen = new VirtualScreen({ x: 0, y: 0 }, frame.viewport.width)
1053 const rowsToOrigin = Math.max(0, prev.cursor.y)
1054 screen.diff.push(CARRIAGE_RETURN)
1055 if (rowsToOrigin > 0) {
1056 screen.diff.push({ type: 'cursorMove', x: 0, y: -rowsToOrigin })
1057 }
1058 renderFrameSlice(screen, frame, 0, frame.screen.height, stylePool, {
1059 clearRowTails: !options?.clearRowsBeforeWrite,
1060 clearRowsBeforeWrite: options?.clearRowsBeforeWrite,
1061 clearToViewportEnd: shouldClearViewportRemainder(prev, frame),
1062 previousFrame: prev,
1063 })
1064 return screen.diff
1065}
1066
1067function mainScreenViewportRepaintFromHome(
1068 frame: Frame,

Callers 2

renderMethod · 0.85

Calls 3

renderFrameSliceFunction · 0.85
maxMethod · 0.80

Tested by

no test coverage detected