diff options
Diffstat (limited to 'zellij-tile/src/shim.rs')
-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 2f00a8a2b..ead213320 100644 --- a/zellij-tile/src/shim.rs +++ b/zellij-tile/src/shim.rs @@ -273,6 +273,14 @@ pub fn new_tabs_with_layout(layout: &str) { unsafe { host_run_plugin_command() }; } +/// Provide a LayoutInfo to be applied to the current session in a new tab. If the layout has multiple tabs, they will all be opened. +pub fn new_tabs_with_layout_info(layout_info: LayoutInfo) { + let plugin_command = PluginCommand::NewTabsWithLayoutInfo(layout_info); + let protobuf_plugin_command: ProtobufPluginCommand = plugin_command.try_into().unwrap(); + object_to_stdout(&protobuf_plugin_command.encode_to_vec()); + unsafe { host_run_plugin_command() }; +} + /// Open a new tab with the default layout pub fn new_tab() { let plugin_command = PluginCommand::NewTab; |