aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helix-term/src/application.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index ee0e08ef..c7d98fce 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -870,9 +870,16 @@ impl Application {
}));
self.event_loop(input_stream).await;
- self.close().await?;
+
+ let err = self.close().await.err();
+
restore_term()?;
+ if let Some(err) = err {
+ self.editor.exit_code = 1;
+ eprintln!("Error: {}", err);
+ }
+
Ok(self.editor.exit_code)
}