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

Reset Cursor when Dialoguer is Interrupted #1109

Closed
nixpulvis opened this issue Mar 16, 2021 · 1 comment
Closed

Reset Cursor when Dialoguer is Interrupted #1109

nixpulvis opened this issue Mar 16, 2021 · 1 comment

Comments

@nixpulvis
Copy link

nixpulvis commented Mar 16, 2021

Running sqlx database drop and then killing the program with ctrl+c leaves me without a cursor.

If I understand correctly, it's the opinion of the dependecy's developers that this should be handled by users of the crate, see console-rs/dialoguer#92. This is presumable because composing library traps could lead to trouble if using various different crates. So I think the ideal solution would be to use whatever the same functionality dialoguer itself is using after the prompt is complete inside a SIGINT trap. Perhaps something like this: console-rs/dialoguer#22 (comment) with the above comments.

@abonander
Copy link
Collaborator

This should also be closed by #1410 which replaces dialoguer with promptly

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

No branches or pull requests

2 participants