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

Method resetLineCount

src/ink/ink.tsx:1694–1706  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1692 return this.exitPromise;
1693 }
1694 resetLineCount(): void {
1695 if (this.options.stdout.isTTY) {
1696 // Swap so old front becomes back (for screen reuse), then reset front
1697 this.backFrame = this.frontFrame;
1698 this.frontFrame = emptyFrame(this.frontFrame.viewport.height, this.frontFrame.viewport.width, this.stylePool, this.charPool, this.hyperlinkPool);
1699 this.logicalBackFrame = this.logicalFrontFrame;
1700 this.logicalFrontFrame = emptyFrame(this.logicalFrontFrame.viewport.height, this.logicalFrontFrame.viewport.width, this.stylePool, this.charPool, this.hyperlinkPool);
1701 this.log.reset();
1702 // frontFrame is reset, so frame.cursor on the next render is (0,0).
1703 // Clear displayCursor so the preamble doesn't compute a stale delta.
1704 this.displayCursor = null;
1705 }
1706 }
1707
1708 /**
1709 * Replace char/hyperlink pools with fresh instances to prevent unbounded

Callers

nothing calls this directly

Calls 2

emptyFrameFunction · 0.85
resetMethod · 0.65

Tested by

no test coverage detected