diff options
author | Aram Drevekenin <aram@poor.dev> | 2024-03-22 17:01:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-22 17:01:17 +0100 |
commit | 5fb75ab6d13bd6e22790224a8a0541a8ac73be60 (patch) | |
tree | 5d82ea14fc51d24a8340a01406352fccaa6e63ee | |
parent | 6a3ecb1a3c4417b8047a523f9519f30bcf7991a2 (diff) |
fix(swap-layouts): properly identify plugin aliases (#3217)
-rw-r--r-- | zellij-utils/src/input/layout.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/zellij-utils/src/input/layout.rs b/zellij-utils/src/input/layout.rs index 74242cff8..c5dbd9947 100644 --- a/zellij-utils/src/input/layout.rs +++ b/zellij-utils/src/input/layout.rs @@ -425,7 +425,7 @@ impl RunPlugin { } } -#[derive(Debug, Serialize, Deserialize, Clone, Hash, Default, PartialEq, Eq)] +#[derive(Debug, Serialize, Deserialize, Clone, Hash, Default, Eq)] pub struct PluginAlias { pub name: String, pub configuration: Option<PluginUserConfiguration>, @@ -433,6 +433,14 @@ pub struct PluginAlias { pub run_plugin: Option<RunPlugin>, } +impl PartialEq for PluginAlias { + fn eq(&self, other: &Self) -> bool { + self.name == other.name + && self.configuration == other.configuration + && self.initial_cwd == other.initial_cwd + } +} + impl PluginAlias { pub fn new( name: &str, |