diff --git a/prompt/_generic_prompt.ts b/prompt/_generic_prompt.ts index 15b68e0d..4e84631b 100644 --- a/prompt/_generic_prompt.ts +++ b/prompt/_generic_prompt.ts @@ -1,5 +1,6 @@ import type { Cursor } from "@cliffy/ansi/cursor-position"; import { type Tty, tty } from "@cliffy/ansi/tty"; +import { getRuntimeName } from "@cliffy/internal/runtime/runtime-name"; import { type KeyCode, parse } from "@cliffy/keycode"; import { bold, @@ -363,7 +364,7 @@ export abstract class GenericPrompt< /** Read user input from stdin. */ #readChar = async (): Promise => { - const buffer = new Uint8Array(8); + const buffer = new Uint8Array(getRuntimeName() === "deno" ? 8 : 4096); const isTty = this.settings.reader.isTerminal(); if (isTty) {