aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
authorFélix Baylac-Jacqué <felix@alternativebit.fr>2018-04-16 16:09:30 +0200
committerFélix Baylac-Jacqué <felix@alternativebit.fr>2018-04-16 16:09:30 +0200
commita91fb422fed800227a78b2fe213d8aa2a39b7529 (patch)
treeeac6a737eba60a6d140e6e95c419b02e7df9d393 /src/nix
parentd34fa2bcc3572fafc893755cee19d97aed7ec649 (diff)
nix repl: Fix multiline SIGINT handling.
Fixes #2076
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/repl.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nix/repl.cc b/src/nix/repl.cc
index 9782e835a..f84774a53 100644
--- a/src/nix/repl.cc
+++ b/src/nix/repl.cc
@@ -189,6 +189,7 @@ bool NixRepl::getLine(string & input, const std::string &prompt)
if (!s) {
switch (auto type = linenoiseKeyType()) {
case 1: // ctrl-C
+ input = "";
return true;
case 2: // ctrl-D
return false;