mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
Registers a process exit fallback that synchronously writes mouse, focus, bracketed paste, Kitty keyboard, and alternate-screen resets. closes #11170
7 lines
304 B
TypeScript
7 lines
304 B
TypeScript
import { ProcessTerminal } from "../../src/terminal.ts";
|
|
import { TuiAltScreen } from "../../src/tui-alt-screen.ts";
|
|
|
|
const tui = new TuiAltScreen(new ProcessTerminal(), false, undefined, { mouse: true });
|
|
tui.start();
|
|
if (process.argv[2] === "stop") tui.stop({ preserveScreen: true });
|
|
process.exit(0);
|