From f77bc1469c32998a80936cf67587ff542fa49c00 Mon Sep 17 00:00:00 2001 From: "Colin T.A. Gray" Date: Wed, 24 Apr 2024 16:37:00 -0400 Subject: [PATCH 1/2] use more universal ANSI sequence for 'clear screen and clear buffer' --- src/compiler/sys.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 32d7af09c03e7..cf9318afdd199 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -1619,7 +1619,7 @@ export let sys: System = (() => { setTimeout, clearTimeout, clearScreen: () => { - process.stdout.write("\x1Bc"); + process.stdout.write("\x1B[2J\x1B[3J\x1BH\x1B[0f"); }, setBlocking: () => { const handle = (process.stdout as any)?._handle as { setBlocking?: (value: boolean) => void; }; From 44ac7fdf82e80f2da85e4f46b21991e5d021f4d1 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 22 Jul 2024 13:06:16 -0700 Subject: [PATCH 2/2] Simplify ansi escapes --- src/compiler/sys.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index cf9318afdd199..da4a3f99ed08c 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -1619,7 +1619,7 @@ export let sys: System = (() => { setTimeout, clearTimeout, clearScreen: () => { - process.stdout.write("\x1B[2J\x1B[3J\x1BH\x1B[0f"); + process.stdout.write("\x1B[2J\x1B[3J\x1B[H"); }, setBlocking: () => { const handle = (process.stdout as any)?._handle as { setBlocking?: (value: boolean) => void; };