|
|
@@ -250,9 +250,14 @@ export async function launchTui(
|
|
|
rl.close();
|
|
|
};
|
|
|
|
|
|
+ const bottomPad = 4;
|
|
|
const promptInput = () => {
|
|
|
drawInputTop();
|
|
|
rl.prompt();
|
|
|
+ // Add padding below prompt so it's not flush with terminal bottom,
|
|
|
+ // then move cursor back up to the prompt line.
|
|
|
+ process.stdout.write("\n".repeat(bottomPad));
|
|
|
+ process.stdout.write(`\x1b[${bottomPad}A`);
|
|
|
};
|
|
|
|
|
|
process.on("SIGINT", () => {
|
|
|
@@ -267,6 +272,8 @@ export async function launchTui(
|
|
|
promptInput();
|
|
|
|
|
|
for await (const line of rl) {
|
|
|
+ // Move past the bottom padding, then draw box bottom
|
|
|
+ process.stdout.write(`\x1b[${bottomPad}B`);
|
|
|
drawInputBottom();
|
|
|
const input = line.trim();
|
|
|
|