Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
343c36a9f0 | |||
123bf51001 |
@ -44,6 +44,7 @@ export async function cliPrompt(
|
||||
render();
|
||||
|
||||
const buf = new Uint8Array(64); // large enough for most pastes
|
||||
inputLoop:
|
||||
while (true) {
|
||||
const n = await Deno.stdin.read(buf);
|
||||
if (n === null) break;
|
||||
@ -60,7 +61,7 @@ export async function cliPrompt(
|
||||
}
|
||||
|
||||
if (byte === 13) { // Enter
|
||||
break;
|
||||
break inputLoop;
|
||||
}
|
||||
|
||||
// Escape sequence?
|
||||
|
Loading…
x
Reference in New Issue
Block a user