summaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/input/layout.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2022-11-01 09:07:25 +0100
committerGitHub <noreply@github.com>2022-11-01 09:07:25 +0100
commitabc700fc4d10d61c969ad94fa520d7d9336dcf14 (patch)
treea2e6318c4fe3951236cfa758befce8b95393a26e /zellij-utils/src/input/layout.rs
parent6d29c6951e4768cc6f2f3c7b1bbb708d79d860c9 (diff)
feat(command-panes): allow to start suspended (#1887)
* feat(command-panes): allow panes to start suspended * style(fmt): remove unused code * style(fmt): rustfmt
Diffstat (limited to 'zellij-utils/src/input/layout.rs')
-rw-r--r--zellij-utils/src/input/layout.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/zellij-utils/src/input/layout.rs b/zellij-utils/src/input/layout.rs
index fa50237a9..38806c21a 100644
--- a/zellij-utils/src/input/layout.rs
+++ b/zellij-utils/src/input/layout.rs
@@ -142,7 +142,7 @@ impl Run {
}
}
pub fn add_close_on_exit(&mut self, close_on_exit: Option<bool>) {
- // overrides the args of a Run::Command if they are Some
+ // overrides the hold_on_close of a Run::Command if it is Some
// and not empty
if let Some(close_on_exit) = close_on_exit {
if let Run::Command(run_command) = self {
@@ -150,6 +150,15 @@ impl Run {
}
}
}
+ pub fn add_start_suspended(&mut self, start_suspended: Option<bool>) {
+ // overrides the hold_on_start of a Run::Command if they are Some
+ // and not empty
+ if let Some(start_suspended) = start_suspended {
+ if let Run::Command(run_command) = self {
+ run_command.hold_on_start = start_suspended;
+ }
+ }
+ }
}
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)]