diff options
author | Aram Drevekenin <aram@poor.dev> | 2023-09-18 16:28:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-18 16:28:06 +0200 |
commit | e392a66833046a2958dfcc0e1147257e59454c41 (patch) | |
tree | 7792e770ec010ff9ceb52c083882502eabee7d11 /zellij-server/src/plugins/unit | |
parent | 74a3b6363594d53f78c16a05444814d68e3fd76f (diff) |
feat(panes): in place run (#2795)
* prototype
* fix tests
* add to all the things except plugins
* add in-place to plugin commands
* fix launch-or-focus should_float and in place behavior
* various cleanups
* style(fmt): rustfmt
Diffstat (limited to 'zellij-server/src/plugins/unit')
-rw-r--r-- | zellij-server/src/plugins/unit/plugin_tests.rs | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/zellij-server/src/plugins/unit/plugin_tests.rs b/zellij-server/src/plugins/unit/plugin_tests.rs index 222b14c65..5c0600cac 100644 --- a/zellij-server/src/plugins/unit/plugin_tests.rs +++ b/zellij-server/src/plugins/unit/plugin_tests.rs @@ -533,9 +533,11 @@ pub fn load_new_plugin_from_hd() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -601,9 +603,11 @@ pub fn plugin_workers() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -672,9 +676,11 @@ pub fn plugin_workers_persist_state() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -747,9 +753,11 @@ pub fn can_subscribe_to_hd_events() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -817,9 +825,11 @@ pub fn switch_to_mode_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -885,9 +895,11 @@ pub fn switch_to_mode_plugin_command_permission_denied() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -953,9 +965,11 @@ pub fn new_tabs_with_layout_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -1035,9 +1049,11 @@ pub fn new_tab_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -1103,9 +1119,11 @@ pub fn go_to_next_tab_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -1170,9 +1188,11 @@ pub fn go_to_previous_tab_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -1237,9 +1257,11 @@ pub fn resize_focused_pane_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -1304,9 +1326,11 @@ pub fn resize_focused_pane_with_direction_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -1371,9 +1395,11 @@ pub fn focus_next_pane_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -1438,9 +1464,11 @@ pub fn focus_previous_pane_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -1505,9 +1533,11 @@ pub fn move_focus_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -1572,9 +1602,11 @@ pub fn move_focus_or_tab_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -1639,9 +1671,11 @@ pub fn edit_scrollback_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -1706,9 +1740,11 @@ pub fn write_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -1773,9 +1809,11 @@ pub fn write_chars_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -1840,9 +1878,11 @@ pub fn toggle_tab_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -1907,9 +1947,11 @@ pub fn move_pane_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -1974,9 +2016,11 @@ pub fn move_pane_with_direction_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -2042,9 +2086,11 @@ pub fn clear_screen_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -2110,9 +2156,11 @@ pub fn scroll_up_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -2177,9 +2225,11 @@ pub fn scroll_down_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -2244,9 +2294,11 @@ pub fn scroll_to_top_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -2311,9 +2363,11 @@ pub fn scroll_to_bottom_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -2378,9 +2432,11 @@ pub fn page_scroll_up_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -2445,9 +2501,11 @@ pub fn page_scroll_down_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -2512,9 +2570,11 @@ pub fn toggle_focus_fullscreen_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -2579,9 +2639,11 @@ pub fn toggle_pane_frames_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -2646,9 +2708,11 @@ pub fn toggle_pane_embed_or_eject_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -2713,9 +2777,11 @@ pub fn undo_rename_pane_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -2780,9 +2846,11 @@ pub fn close_focus_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -2847,9 +2915,11 @@ pub fn toggle_active_tab_sync_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -2914,9 +2984,11 @@ pub fn close_focused_tab_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -2981,9 +3053,11 @@ pub fn undo_rename_tab_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -3048,9 +3122,11 @@ pub fn previous_swap_layout_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -3115,9 +3191,11 @@ pub fn next_swap_layout_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -3182,9 +3260,11 @@ pub fn go_to_tab_name_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -3249,9 +3329,11 @@ pub fn focus_or_create_tab_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -3316,9 +3398,11 @@ pub fn go_to_tab() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -3383,9 +3467,11 @@ pub fn start_or_reload_plugin() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -3457,9 +3543,11 @@ pub fn quit_zellij_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -3531,9 +3619,11 @@ pub fn detach_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -3605,9 +3695,11 @@ pub fn open_file_floating_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -3679,9 +3771,11 @@ pub fn open_file_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -3754,9 +3848,11 @@ pub fn open_file_with_line_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -3828,9 +3924,11 @@ pub fn open_file_with_line_floating_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -3902,9 +4000,11 @@ pub fn open_terminal_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -3976,9 +4076,11 @@ pub fn open_terminal_floating_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -4050,9 +4152,11 @@ pub fn open_command_pane_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -4124,9 +4228,11 @@ pub fn open_command_pane_floating_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -4191,9 +4297,11 @@ pub fn switch_to_tab_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -4253,9 +4361,11 @@ pub fn hide_self_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -4315,9 +4425,11 @@ pub fn show_self_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -4382,9 +4494,11 @@ pub fn close_terminal_pane_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -4449,9 +4563,11 @@ pub fn close_plugin_pane_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -4516,9 +4632,11 @@ pub fn focus_terminal_pane_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -4583,9 +4701,11 @@ pub fn focus_plugin_pane_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -4650,9 +4770,11 @@ pub fn rename_terminal_pane_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -4717,9 +4839,11 @@ pub fn rename_plugin_pane_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -4784,9 +4908,11 @@ pub fn rename_tab_plugin_command() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -4860,9 +4986,11 @@ pub fn send_configuration_to_plugins() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -4924,9 +5052,11 @@ pub fn request_plugin_permissions() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin, tab_index, + None, client_id, size, )); @@ -5012,9 +5142,11 @@ pub fn granted_permission_request_result() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( plugin_should_float, + false, plugin_title, run_plugin.clone(), tab_index, + None, client_id, size, )); @@ -5098,9 +5230,11 @@ pub fn denied_permission_request_result() { let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id)); let _ = plugin_thread_sender.send(PluginInstruction::Load( |