Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI cursor missing after force quit #1237

Closed
LitoMore opened this issue May 27, 2023 · 0 comments
Closed

CLI cursor missing after force quit #1237

LitoMore opened this issue May 27, 2023 · 0 comments
Labels

Comments

@LitoMore
Copy link
Collaborator

LitoMore commented May 27, 2023

How to reproduce

  1. Run npx @inquirer/prompts@latest or run npx inquirer-demo under the project.
  2. Press control + c to force quit
  3. Now CLI cursor disappeared

Details

We should handle process.on('exit', () => {}) and rl.on('SIGINT', () => {}) like previously does:

// Make sure new prompt start on a newline when closing
process.on('exit', this.onForceClose);
// Terminate process on SIGINT (which will call process.on('exit') in return)
this.rl.on('SIGINT', this.onForceClose);

@SBoudrias Where should I place the code? Can I put the code to the constructor of class ScreenManager?

Related issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant