diff options
author | Brooks J Rady <b.j.rady@gmail.com> | 2021-05-29 23:12:11 +0100 |
---|---|---|
committer | Brooks J Rady <b.j.rady@gmail.com> | 2021-05-29 23:12:11 +0100 |
commit | f2c5ee44f7f2c61f50b043bd8e55f915a3667fce (patch) | |
tree | 3e0ab2bb70869352c47085cc857b6e86becb840a /zellij-server/src/wasm_vm.rs | |
parent | fe299325eb54e6642d27a417a3922a757b4390e4 (diff) |
Getting back to where we started... (Buggy Resizing)
Diffstat (limited to 'zellij-server/src/wasm_vm.rs')
-rw-r--r-- | zellij-server/src/wasm_vm.rs | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/zellij-server/src/wasm_vm.rs b/zellij-server/src/wasm_vm.rs index 53dceaa75..62198d685 100644 --- a/zellij-server/src/wasm_vm.rs +++ b/zellij-server/src/wasm_vm.rs @@ -158,7 +158,8 @@ pub(crate) fn zellij_exports(store: &Store, plugin_env: &PluginEnv) -> ImportObj host_subscribe, host_unsubscribe, host_set_invisible_borders, - host_set_max_height, + host_set_fixed_height, + host_set_fixed_width, host_set_selectable, host_get_plugin_ids, host_open_file, @@ -189,13 +190,24 @@ fn host_set_selectable(plugin_env: &PluginEnv, selectable: i32) { .unwrap() } -fn host_set_max_height(plugin_env: &PluginEnv, max_height: i32) { - let max_height = max_height as usize; +fn host_set_fixed_height(plugin_env: &PluginEnv, fixed_height: i32) { + let fixed_height = fixed_height as usize; plugin_env .senders - .send_to_screen(ScreenInstruction::SetMaxHeight( + .send_to_screen(ScreenInstruction::SetFixedHeight( PaneId::Plugin(plugin_env.plugin_id), - max_height, + fixed_height, + )) + .unwrap() +} + +fn host_set_fixed_width(plugin_env: &PluginEnv, fixed_width: i32) { + let fixed_width = fixed_width as usize; + plugin_env + .senders + .send_to_screen(ScreenInstruction::SetFixedWidth( + PaneId::Plugin(plugin_env.plugin_id), + fixed_width, )) .unwrap() } |