(
prev: Frame,
frame: Frame,
stylePool: StylePool,
options?: {
clearRowsBeforeWrite?: boolean
},
)
| 1042 | } |
| 1043 | |
| 1044 | function 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 | |
| 1067 | function mainScreenViewportRepaintFromHome( |
| 1068 | frame: Frame, |
no test coverage detected