diff options
author | Brian Campbell <lambda@continuation.org> | 2016-10-18 23:37:49 -0400 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2016-10-29 21:23:05 -0400 |
commit | 79a8d0ab3f75be2d30a8c55ae97dfd858e583be8 (patch) | |
tree | cc92c3ac9335fe55abfcb41f3ce4bbdaa064c9c5 /Cargo.toml | |
parent | fbf8265cded97bf4743563249181641b1b17188e (diff) |
Reset the terminal when Ctrl-C is pressed
If a user hits Ctrl-C to exit out of a search in the middle of printing
a line, we don't want to leave the terminal colors screwed up for them.
Catch Ctrl-C using the ctrlc crate, obtain a stdout lock to ensure that
other threads don't continue writing after we do so, reset the terminal,
and exit the program.
Closes #119
Diffstat (limited to 'Cargo.toml')
-rw-r--r-- | Cargo.toml | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -24,6 +24,7 @@ name = "integration" path = "tests/tests.rs" [dependencies] +ctrlc = "2.0" deque = "0.3" docopt = "0.6" env_logger = "0.3" |