MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / didShrink

Function didShrink

src/cli/viewport.ts:58–63  ·  view source on GitHub ↗
(
  prev: { cols: number; rows: number },
  next: { cols: number; rows: number },
)

Source from the content-addressed store, hash-verified

56 * history as a duplicate. We detect a shrink so the UI can clear + repaint cleanly.
57 */
58export function didShrink(
59 prev: { cols: number; rows: number },
60 next: { cols: number; rows: number },
61): boolean {
62 return next.cols < prev.cols || next.rows < prev.rows;
63}
64
65/** ANSI: clear the entire screen AND the scrollback, home the cursor. Used on a
66 * shrink so the reflowed/duplicated frame is wiped before Ink repaints. */

Callers 2

viewport.test.tsFile · 0.90
onResizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected