Skip to content

Commit

Permalink
Enable cursor blinking on exit
Browse files Browse the repository at this point in the history
Try to enable cursor blinking when exiting the command line prompt.

Generated by gpt-3.5-turbo
  • Loading branch information
joone committed Mar 10, 2024
1 parent 1f07ebe commit ed2f8c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/prompt/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ export class CommandLinePrompt implements PromptInterface {
exit(): void {
clearInterval(this.timer);
// Show the cursor
process.stdout.write("\x1B[?25h");
process.stdout.write("\x1B[?25h"); // Show the cursor
process.stdout.write("\x1B[?12h"); // Try to enable cursor blinking
// Reset the terminal to the normal mode
process.stdin.setRawMode(false);
this.rl.close();
Expand Down

0 comments on commit ed2f8c4

Please sign in to comment.