mirror of
https://github.com/denoland/deno.git
synced 2024-10-29 08:58:01 -04:00
fix(cli/repl): keyboard interrupt should continue (#7960)
This changes the behavior of keyboard interrupts (ctrl+c) to continue, clearing the current line instead of exiting. Exit can still be done with ctrl+d or by calling close().
This commit is contained in:
parent
f5c23f8058
commit
8eb44537ec
1 changed files with 2 additions and 1 deletions
|
@ -402,7 +402,8 @@ pub async fn run(
|
||||||
editor.lock().unwrap().add_history_entry(line.as_str());
|
editor.lock().unwrap().add_history_entry(line.as_str());
|
||||||
}
|
}
|
||||||
Err(ReadlineError::Interrupted) => {
|
Err(ReadlineError::Interrupted) => {
|
||||||
break;
|
println!("exit using ctrl+d or close()");
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
Err(ReadlineError::Eof) => {
|
Err(ReadlineError::Eof) => {
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue