mirror of
https://github.com/nushell/nushell
synced 2024-12-30 15:03:25 +00:00
Merge pull request #79 from kubouch/disable-raw-mode
Disable crossterm raw mode
This commit is contained in:
commit
5b3b74ebec
3 changed files with 7 additions and 0 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -265,6 +265,7 @@ name = "engine-q"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"assert_cmd",
|
||||
"crossterm",
|
||||
"miette",
|
||||
"nu-cli",
|
||||
"nu-command",
|
||||
|
|
|
@ -10,6 +10,7 @@ members = ["crates/nu-cli", "crates/nu-engine", "crates/nu-parser", "crates/nu-c
|
|||
|
||||
[dependencies]
|
||||
reedline = { git = "https://github.com/jntrnr/reedline", branch = "main" }
|
||||
crossterm = "0.21.*"
|
||||
nu-cli = { path="./crates/nu-cli" }
|
||||
nu-command = { path="./crates/nu-command" }
|
||||
nu-engine = { path="./crates/nu-engine" }
|
||||
|
|
|
@ -17,6 +17,11 @@ mod tests;
|
|||
|
||||
fn main() -> Result<()> {
|
||||
miette::set_panic_hook();
|
||||
let miette_hook = std::panic::take_hook();
|
||||
std::panic::set_hook(Box::new(move |x| {
|
||||
crossterm::terminal::disable_raw_mode().unwrap();
|
||||
miette_hook(x);
|
||||
}));
|
||||
|
||||
let engine_state = create_default_context();
|
||||
|
||||
|
|
Loading…
Reference in a new issue