From a738c450cd1d5cb5f2f8da43868c10f44c429d68 Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 17 Nov 2024 15:56:54 +0100 Subject: [PATCH] fix --- cli/prompt_select.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/prompt_select.ts b/cli/prompt_select.ts index 3d6b82d1fc7f..5280ed6be205 100644 --- a/cli/prompt_select.ts +++ b/cli/prompt_select.ts @@ -66,10 +66,10 @@ export function promptSelect( case CR: break loop; } - Deno.stdout.writeSync(encoder.encode(`\x1b[${length}A${CLR}`)); + Deno.stdout.writeSync(encoder.encode(`\x1b[1A${CLR}`.repeat(length))); } if (options.clear) { - Deno.stdout.writeSync(encoder.encode(`\x1b[${length + 1}A${CLR}`)); // clear values and message + Deno.stdout.writeSync(encoder.encode(`\x1b[1A${CLR}`.repeat(length + 1))); // clear values and message } Deno.stdin.setRaw(false); return values[selectedIndex] ?? null;