From 5fb75ab6d13bd6e22790224a8a0541a8ac73be60 Mon Sep 17 00:00:00 2001 From: Aram Drevekenin Date: Fri, 22 Mar 2024 17:01:17 +0100 Subject: [PATCH] fix(swap-layouts): properly identify plugin aliases (#3217) --- zellij-utils/src/input/layout.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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, @@ -433,6 +433,14 @@ pub struct PluginAlias { pub run_plugin: Option, } +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,