aboutsummaryrefslogtreecommitdiff
path: root/helix-view
diff options
context:
space:
mode:
authorCole Helbling2021-11-15 04:06:12 +0000
committerGitHub2021-11-15 04:06:12 +0000
commit87e61a0894d6af1838c5d288fae83279004026fb (patch)
tree8f394c31c527a470bed62109d9def43da9bd663a /helix-view
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-view')
-rw-r--r--helix-view/src/editor.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 7650d217..e4015707 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -129,6 +129,8 @@ pub struct Editor {
pub idle_timer: Pin<Box<Sleep>>,
pub last_motion: Option<Motion>,
+
+ pub exit_code: i32,
}
#[derive(Debug, Copy, Clone)]
@@ -167,6 +169,7 @@ impl Editor {
idle_timer: Box::pin(sleep(config.idle_timeout)),
last_motion: None,
config,
+ exit_code: 0,
}
}