-
Notifications
You must be signed in to change notification settings - Fork 81
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
cargo watch -x run
after some saves turns the terminal into a mess.
#269
Comments
yeah, that's your program not resetting the screen gracefully on restart. try doing
|
Any way for me to implement that in my code? |
sure, hook to sigint/ctrlc and cleanup state, or as a last resort, forcibly reset the screen. you can use the clearscreen crate for this, or your terminal manipulation library may have a facility |
After looking up on this I seem to not find a way to catch the termination signal of cargo-watch and reset the screen |
And my program seems to start thinking I pressed enter twice |
You're right, I keep getting confused between the current states of cargo watch and watchexec. There's no easy way to catch that signal at the moment. If you use watchexec directly instead (a bit less nice for cargo projects), you'll get a SIGTERM by default, and can customise that too, and you can use |
Any plans to implement that for cargo-watch? |
definitely. currently waiting for/working on:
once the first two are done in watchexec, i'll consider it stable enough to start porting cargo watch, at which point i'll aim for cli flags feature parity. tl;dr: not immediately but it's in sight |
Issue
It sometimes essentially locks the entire terminal and throws the text everywhere on save.
Might it be a conflict with the "menu" or something?
Screenshot
The text was updated successfully, but these errors were encountered: