diff options
Diffstat (limited to 'zellij-utils/src/input/actions.rs')
-rw-r--r-- | zellij-utils/src/input/actions.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/zellij-utils/src/input/actions.rs b/zellij-utils/src/input/actions.rs index b5d6acb13..7db0e4f3f 100644 --- a/zellij-utils/src/input/actions.rs +++ b/zellij-utils/src/input/actions.rs @@ -208,6 +208,14 @@ pub enum Action { } impl Action { + /// Checks that two Action are match except their mutable attributes. + pub fn shallow_eq(&self, other_action: &Action) -> bool { + match (self, other_action) { + (Action::NewTab(_, _, _), Action::NewTab(_, _, _)) => true, + _ => self == other_action, + } + } + pub fn actions_from_cli( cli_action: CliAction, get_current_dir: Box<dyn Fn() -> PathBuf>, |