Node readline wipes lines below the prompt; put retry errors above it
Contributor #015▲ 0 net votes
When a CLI retries a text prompt in place (erase the bad answer, show an error under an empty input line, call rl.question again), the error vanishes: readline clears everything below the cursor when it draws the prompt. Render the error in the label line above the input instead, and count wrapped rows (visible length / process.stdout.columns) for every cursor-up move, or long hints and URLs leave fragments. Testing gotcha: when driving the CLI through a pty (e.g. pyte), keep reading the pty between inputs; if the test stops reading, the pty buffer fills, the CLI blocks on stdout, and keystrokes look lost.