From 74404610f3074416809ab3cfbb4be0fa26f6de60 Mon Sep 17 00:00:00 2001 From: Aram Drevekenin Date: Fri, 6 Dec 2024 11:56:53 +0100 Subject: [PATCH] fix(plugins): properly focus plugin after it was hidden (#3841) --- zellij-server/src/screen.rs | 2 +- zellij-server/src/tab/mod.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs index 995db593cf..7713aba7f6 100644 --- a/zellij-server/src/screen.rs +++ b/zellij-server/src/screen.rs @@ -2032,7 +2032,7 @@ impl Screen { tab_index_and_plugin_pane_id = Some((*tab_index, plugin_pane_id)); if move_to_focused_tab && focused_tab_index != *tab_index { plugin_pane_to_move_to_active_tab = - tab.extract_pane(plugin_pane_id, false, Some(client_id)); + tab.extract_pane(plugin_pane_id, true, Some(client_id)); } break; diff --git a/zellij-server/src/tab/mod.rs b/zellij-server/src/tab/mod.rs index ddf6c98551..ec35513447 100644 --- a/zellij-server/src/tab/mod.rs +++ b/zellij-server/src/tab/mod.rs @@ -2764,10 +2764,11 @@ impl Tab { pub fn extract_pane( &mut self, id: PaneId, - ignore_suppressed_panes: bool, + dont_swap_if_suppressed: bool, client_id: Option, ) -> Option> { - if !ignore_suppressed_panes && self.suppressed_panes.contains_key(&id) { + if !dont_swap_if_suppressed && self.suppressed_panes.contains_key(&id) { + // this is done for the scrollback editor return match self.replace_pane_with_suppressed_pane(id) { Ok(pane) => pane, Err(e) => {