diff options
| author | Aram Drevekenin <aram@poor.dev> | 2024-03-27 20:24:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-27 20:24:18 +0100 |
| commit | 9d2e7fe2c19d2d61223dcc30787ea83a0e447781 (patch) | |
| tree | c077c4fdedb48d18c9e933c76ef8e97850d59bed /zellij-utils/src/plugin_api/plugin_command.rs | |
| parent | docs(changelog): plugin serialization fix (diff) | |
| download | sl0ppij-9d2e7fe2c19d2d61223dcc30787ea83a0e447781.tar.gz sl0ppij-9d2e7fe2c19d2d61223dcc30787ea83a0e447781.tar.xz sl0ppij-9d2e7fe2c19d2d61223dcc30787ea83a0e447781.zip | |
feat(plugins): add api to close current plugin instance (#3228)
Diffstat (limited to 'zellij-utils/src/plugin_api/plugin_command.rs')
| -rw-r--r-- | zellij-utils/src/plugin_api/plugin_command.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/zellij-utils/src/plugin_api/plugin_command.rs b/zellij-utils/src/plugin_api/plugin_command.rs index 232a9f2d..080dd9e2 100644 --- a/zellij-utils/src/plugin_api/plugin_command.rs +++ b/zellij-utils/src/plugin_api/plugin_command.rs @@ -871,6 +871,10 @@ impl TryFrom<ProtobufPluginCommand> for PluginCommand { Some(_) => Err("DumpSessionLayout should have no payload, found a payload"), None => Ok(PluginCommand::DumpSessionLayout), }, + Some(CommandName::CloseSelf) => match protobuf_plugin_command.payload { + Some(_) => Err("CloseSelf should have no payload, found a payload"), + None => Ok(PluginCommand::CloseSelf), + }, None => Err("Unrecognized plugin command"), } } @@ -1389,6 +1393,10 @@ impl TryFrom<PluginCommand> for ProtobufPluginCommand { name: CommandName::DumpSessionLayout as i32, payload: None, }), + PluginCommand::CloseSelf => Ok(ProtobufPluginCommand { + name: CommandName::CloseSelf as i32, + payload: None, + }), } } } |
