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

Method repaint

src/ink/ink.tsx:928–938  ·  view source on GitHub ↗

* Reset frame buffers so the next render writes the full screen from scratch. * Call this before resume() when the terminal content has been corrupted by * an external process (e.g. tmux, shell, full-screen TUI).

()

Source from the content-addressed store, hash-verified

926 * an external process (e.g. tmux, shell, full-screen TUI).
927 */
928 repaint(): void {
929 this.frontFrame = emptyFrame(this.frontFrame.viewport.height, this.frontFrame.viewport.width, this.stylePool, this.charPool, this.hyperlinkPool);
930 this.backFrame = emptyFrame(this.backFrame.viewport.height, this.backFrame.viewport.width, this.stylePool, this.charPool, this.hyperlinkPool);
931 this.logicalFrontFrame = emptyFrame(this.logicalFrontFrame.viewport.height, this.logicalFrontFrame.viewport.width, this.stylePool, this.charPool, this.hyperlinkPool);
932 this.logicalBackFrame = emptyFrame(this.logicalBackFrame.viewport.height, this.logicalBackFrame.viewport.width, this.stylePool, this.charPool, this.hyperlinkPool);
933 this.log.reset();
934 // Physical cursor position is unknown after external terminal corruption.
935 // Clear displayCursor so the cursor preamble doesn't emit a stale
936 // relative move from where we last parked it.
937 this.displayCursor = null;
938 }
939
940 /**
941 * Clear the physical terminal and force a full redraw.

Callers 2

exitAlternateScreenMethod · 0.95
setAltScreenActiveMethod · 0.95

Calls 2

emptyFrameFunction · 0.85
resetMethod · 0.65

Tested by

no test coverage detected