aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2024-12-06 11:56:53 +0100
committerGitHub <noreply@github.com>2024-12-06 11:56:53 +0100
commit5a7a4d459255adc7f11bfe35d3f18d50c6d2ec7e (patch)
treef4720343bd15a70fcca1dbb05a3beae784316ba2
parentdocs(changelog): slash detach fix (diff)
downloadsl0ppij-5a7a4d459255adc7f11bfe35d3f18d50c6d2ec7e.tar.gz
sl0ppij-5a7a4d459255adc7f11bfe35d3f18d50c6d2ec7e.tar.xz
sl0ppij-5a7a4d459255adc7f11bfe35d3f18d50c6d2ec7e.zip
fix(plugins): properly focus plugin after it was hidden (#3841)
-rw-r--r--zellij-server/src/screen.rs2
-rw-r--r--zellij-server/src/tab/mod.rs5
2 files changed, 4 insertions, 3 deletions
diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs
index 66065508..9bbc87b2 100644
--- a/zellij-server/src/screen.rs
+++ b/zellij-server/src/screen.rs
@@ -2035,7 +2035,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 d69a23cb..3482cac6 100644
--- a/zellij-server/src/tab/mod.rs
+++ b/zellij-server/src/tab/mod.rs
@@ -2760,10 +2760,11 @@ impl Tab {
pub fn extract_pane(
&mut self,
id: PaneId,
- ignore_suppressed_panes: bool,
+ dont_swap_if_suppressed: bool,
client_id: Option<ClientId>,
) -> Option<Box<dyn Pane>> {
- 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) => {