summaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/input/layout.rs
diff options
context:
space:
mode:
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)]