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 | docs(changelog): pipe keybind (diff) | |
| download | sl0ppij-5fb75ab6d13bd6e22790224a8a0541a8ac73be60.tar.gz sl0ppij-5fb75ab6d13bd6e22790224a8a0541a8ac73be60.tar.xz sl0ppij-5fb75ab6d13bd6e22790224a8a0541a8ac73be60.zip | |
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 74242cff..c5dbd994 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, |
