diff options
author | Aram Drevekenin <aram@poor.dev> | 2022-12-26 11:02:22 +0100 |
---|---|---|
committer | Aram Drevekenin <aram@poor.dev> | 2022-12-26 11:02:22 +0100 |
commit | 4d4072a4dc05272b8163313233492aed2de9ceb1 (patch) | |
tree | 7a1b7b43893936ca2a8f4c2d4a3341db12f607ad /zellij-server/src/screen.rs | |
parent | 02e80860a22a595e0aac48cf0bac937614963551 (diff) |
relayout working with hard coded layout
Diffstat (limited to 'zellij-server/src/screen.rs')
-rw-r--r-- | zellij-server/src/screen.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs index 2c5e44b55..26d82b8e9 100644 --- a/zellij-server/src/screen.rs +++ b/zellij-server/src/screen.rs @@ -229,6 +229,7 @@ pub enum ScreenInstruction { SearchToggleWrap(ClientId), AddRedPaneFrameColorOverride(Vec<PaneId>, Option<String>), // Option<String> => optional error text ClearPaneFrameColorOverride(Vec<PaneId>), + RelayoutFocusedTab(ClientId), } impl From<&ScreenInstruction> for ScreenContext { @@ -366,6 +367,7 @@ impl From<&ScreenInstruction> for ScreenContext { ScreenInstruction::ClearPaneFrameColorOverride(..) => { ScreenContext::ClearPaneFrameColorOverride }, + ScreenInstruction::RelayoutFocusedTab(..) => ScreenContext::RelayoutFocusedTab, } } } @@ -2167,6 +2169,15 @@ pub(crate) fn screen_thread_main( } screen.render()?; }, + ScreenInstruction::RelayoutFocusedTab(client_id) => { + active_tab_and_connected_client_id!( + screen, + client_id, + |tab: &mut Tab, client_id: ClientId| tab.relayout(client_id) + ); + screen.render()?; + screen.unblock_input()?; + } } } Ok(()) |