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-tile/src | |
| 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-tile/src')
| -rw-r--r-- | zellij-tile/src/shim.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/zellij-tile/src/shim.rs b/zellij-tile/src/shim.rs index 532a5faf..2f00a8a2 100644 --- a/zellij-tile/src/shim.rs +++ b/zellij-tile/src/shim.rs @@ -249,6 +249,14 @@ pub fn show_self(should_float_if_hidden: bool) { unsafe { host_run_plugin_command() }; } +/// Close this plugin pane +pub fn close_self() { + let plugin_command = PluginCommand::CloseSelf; + let protobuf_plugin_command: ProtobufPluginCommand = plugin_command.try_into().unwrap(); + object_to_stdout(&protobuf_plugin_command.encode_to_vec()); + unsafe { host_run_plugin_command() }; +} + /// Switch to the specified Input Mode (eg. `Normal`, `Tab`, `Pane`) pub fn switch_to_input_mode(mode: &InputMode) { let plugin_command = PluginCommand::SwitchToMode(*mode); |
