mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
Merge pull request #5665 from edolstra/repl-reset-terminal
nix repl: Reset the terminal on exceptional exits
This commit is contained in:
commit
55275fcc59
1 changed files with 1 additions and 0 deletions
|
@ -279,6 +279,7 @@ bool NixRepl::getLine(string & input, const std::string &prompt)
|
||||||
};
|
};
|
||||||
|
|
||||||
setupSignals();
|
setupSignals();
|
||||||
|
Finally resetTerminal([&]() { rl_deprep_terminal(); });
|
||||||
char * s = readline(prompt.c_str());
|
char * s = readline(prompt.c_str());
|
||||||
Finally doFree([&]() { free(s); });
|
Finally doFree([&]() { free(s); });
|
||||||
restoreSignals();
|
restoreSignals();
|
||||||
|
|
Loading…
Reference in a new issue