mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 06:52:43 +01:00
nix repl: Fix multiline SIGINT handling.
Fixes #2076
(cherry picked from commit a91fb422fe)
This commit is contained in:
parent
effbbca812
commit
5be4f48c2d
1 changed files with 1 additions and 0 deletions
|
|
@ -189,6 +189,7 @@ bool NixRepl::getLine(string & input, const std::string &prompt)
|
||||||
if (!s) {
|
if (!s) {
|
||||||
switch (auto type = linenoiseKeyType()) {
|
switch (auto type = linenoiseKeyType()) {
|
||||||
case 1: // ctrl-C
|
case 1: // ctrl-C
|
||||||
|
input = "";
|
||||||
return true;
|
return true;
|
||||||
case 2: // ctrl-D
|
case 2: // ctrl-D
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue