summaryrefslogtreecommitdiffstats
path: root/Cargo.toml
diff options
context:
space:
mode:
authorBrian Campbell <lambda@continuation.org>2016-10-18 23:37:49 -0400
committerAndrew Gallant <jamslam@gmail.com>2016-10-29 21:23:05 -0400
commit79a8d0ab3f75be2d30a8c55ae97dfd858e583be8 (patch)
treecc92c3ac9335fe55abfcb41f3ce4bbdaa064c9c5 /Cargo.toml
parentfbf8265cded97bf4743563249181641b1b17188e (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.toml1
1 files changed, 1 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 60db7c4b..57b32050 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -24,6 +24,7 @@ name = "integration"
path = "tests/tests.rs"
[dependencies]
+ctrlc = "2.0"
deque = "0.3"
docopt = "0.6"
env_logger = "0.3"