Fixed windows dying when opening text files

This commit is contained in:
veeso
2021-06-19 15:01:54 +02:00
parent 4475e8c24c
commit 5a4a364250
5 changed files with 14 additions and 3 deletions

View File

@@ -92,6 +92,7 @@ impl SetupActivity {
error!("Failed to disable raw mode: {}", err);
}
// Leave alternate mode
#[cfg(not(target_os = "windows"))]
ctx.leave_alternate_screen();
// Get result
let result: Result<(), String> = match ctx.config_client.as_ref() {
@@ -121,6 +122,7 @@ impl SetupActivity {
// Clear screen
ctx.clear_screen();
// Enter alternate mode
#[cfg(not(target_os = "windows"))]
ctx.enter_alternate_screen();
// Re-enable raw mode
if let Err(err) = enable_raw_mode() {