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

@@ -113,6 +113,7 @@ impl FileTransferActivity {
error!("Failed to disable raw mode: {}", err);
}
// Leave alternate mode
#[cfg(not(target_os = "windows"))]
if let Some(ctx) = self.context.as_mut() {
ctx.leave_alternate_screen();
}
@@ -127,6 +128,7 @@ impl FileTransferActivity {
),
Err(err) => return Err(format!("Could not open editor: {}", err)),
}
#[cfg(not(target_os = "windows"))]
if let Some(ctx) = self.context.as_mut() {
// Clear screen
ctx.clear_screen();