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

Hidden Cursor during yes/no prompt #11

Open
mrjackwills opened this issue May 17, 2023 · 2 comments
Open

Hidden Cursor during yes/no prompt #11

mrjackwills opened this issue May 17, 2023 · 2 comments

Comments

@mrjackwills
Copy link

mrjackwills commented May 17, 2023

For me, I think it would be beneficial if the cursor was visible when the user is prompted:

Clean the project directories shown above? [y/n]

It could be hidden again once an input is captured. I think this is a simple fix that I would create a PR for.

Also, if one executes a CTRL+C at this stage, the application will crash;

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Interrupted, error: "read interrupted" }', /home/jack/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-clean-all-0.5.0/src/main.rs:219:14
@dnlmlr
Copy link
Owner

dnlmlr commented May 20, 2023

So the panic, while not really being a problem, is obviously a bug and should be fixed now.

The cursor on the other hand wasn't something I did on purpose but something that the dialoguer crate just seems to do. If you know how to change that behavior, let me know and I'll change it like you suggested

@mrjackwills
Copy link
Author

I'll have a look and submit a PR

@dnlmlr dnlmlr changed the title Input hide cursor issue & bug Hidden Cursor during yes/no prompt May 27, 2023
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