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

Function getAltScreenResizeRepaintMode

src/ink/altScreenResizePolicy.ts:14–26  ·  view source on GitHub ↗
(
  prevWidth: number,
  nextWidth: number,
  synchronizedOutputSupported: boolean,
)

Source from the content-addressed store, hash-verified

12 * not show a full blank frame between erase and paint.
13 */
14export function getAltScreenResizeRepaintMode(
15 prevWidth: number,
16 nextWidth: number,
17 synchronizedOutputSupported: boolean,
18): AltScreenRepaintMode {
19 if (prevWidth === nextWidth) {
20 return 'none'
21 }
22
23 return synchronizedOutputSupported
24 ? 'erase-before-paint'
25 : 'repaint-from-home'
26}
27
28/**
29 * Alt-screen recovery (SIGCONT, sleep/wake, fullscreen editor return) uses the

Callers 2

InkClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected