Skip to content

Commit

Permalink
fix(plugins): properly focus plugin after it was hidden (#3841)
Browse files Browse the repository at this point in the history
  • Loading branch information
imsnif authored Dec 6, 2024
1 parent 521f27c commit 5a7a4d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion zellij-server/src/screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions zellij-server/src/tab/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 5a7a4d4

Please sign in to comment.