aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/application.rs
diff options
context:
space:
mode:
authorCole Helbling2021-11-15 04:06:12 +0000
committerGitHub2021-11-15 04:06:12 +0000
commit87e61a0894d6af1838c5d288fae83279004026fb (patch)
tree8f394c31c527a470bed62109d9def43da9bd663a /helix-term/src/application.rs
parentf5e070e808d2edaeae04497c01f5a0f813407956 (diff)
helix-term/commands: implement cquit (#1096)
This allows you to exit helix with an exit code, e.g. `:cq 2`.
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r--helix-term/src/application.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index b04eef0d..2969a9e5 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -599,7 +599,7 @@ impl Application {
Ok(())
}
- pub async fn run(&mut self) -> Result<(), Error> {
+ pub async fn run(&mut self) -> Result<i32, Error> {
self.claim_term().await?;
// Exit the alternate screen and disable raw mode before panicking
@@ -622,6 +622,6 @@ impl Application {
self.restore_term()?;
- Ok(())
+ Ok(self.editor.exit_code)
}
}