restore terminal snapshot on panic
This commit is contained in:
parent
380d69978c
commit
870d6d02b5
1 changed files with 5 additions and 1 deletions
|
|
@ -641,7 +641,11 @@ pub fn start(mut os_input: Box<dyn OsApi>, opts: CliArgs) {
|
||||||
let _ = wasm_thread.join();
|
let _ = wasm_thread.join();
|
||||||
os_input.unset_raw_mode(0);
|
os_input.unset_raw_mode(0);
|
||||||
let goto_start_of_last_line = format!("\u{1b}[{};{}H", full_screen_ws.rows, 1);
|
let goto_start_of_last_line = format!("\u{1b}[{};{}H", full_screen_ws.rows, 1);
|
||||||
let error = format!("{}\n{}", goto_start_of_last_line, backtrace);
|
let restore_snapshot = "\u{1b}[?1049l";
|
||||||
|
let error = format!(
|
||||||
|
"{}\n{}{}",
|
||||||
|
goto_start_of_last_line, restore_snapshot, backtrace
|
||||||
|
);
|
||||||
let _ = os_input
|
let _ = os_input
|
||||||
.get_stdout_writer()
|
.get_stdout_writer()
|
||||||
.write(error.as_bytes())
|
.write(error.as_bytes())
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue