diff options
| author | Aram Drevekenin <aram@poor.dev> | 2022-11-23 18:14:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-23 18:14:24 +0100 |
| commit | f8fbd8a138f46db4a02084a98bb182f625faea4a (patch) | |
| tree | 8d7faee691d1691e786827f3803947b8c7fdfbc9 /zellij-server/src/tab | |
| parent | docs(changelog): server/client crash fix (diff) | |
| download | sl0ppij-f8fbd8a138f46db4a02084a98bb182f625faea4a.tar.gz sl0ppij-f8fbd8a138f46db4a02084a98bb182f625faea4a.tar.xz sl0ppij-f8fbd8a138f46db4a02084a98bb182f625faea4a.zip | |
fix(panes): focus change when closing and between tabs (#1966)
* fix(panes): do not forget pane focus when switching tabs or closing panes
* style(fmt): rustfmt
* fix(tests): e2e snapshots
Diffstat (limited to 'zellij-server/src/tab')
| -rw-r--r-- | zellij-server/src/tab/mod.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/zellij-server/src/tab/mod.rs b/zellij-server/src/tab/mod.rs index e98b4614..45200f7c 100644 --- a/zellij-server/src/tab/mod.rs +++ b/zellij-server/src/tab/mod.rs @@ -681,11 +681,11 @@ impl Tab { self.floating_panes.first_active_floating_pane_id() { self.floating_panes - .focus_pane(first_active_floating_pane_id, client_id); + .focus_pane_if_client_not_focused(first_active_floating_pane_id, client_id); } if let Some(first_active_tiled_pane_id) = self.tiled_panes.first_active_pane_id() { self.tiled_panes - .focus_pane(first_active_tiled_pane_id, client_id); + .focus_pane_if_client_not_focused(first_active_tiled_pane_id, client_id); } self.connected_clients.borrow_mut().insert(client_id); self.mode_info.borrow_mut().insert( @@ -707,7 +707,8 @@ impl Tab { format!("failed to acquire id of focused pane while adding client {client_id}",) })?) }; - self.tiled_panes.focus_pane(focus_pane_id, client_id); + self.tiled_panes + .focus_pane_if_client_not_focused(focus_pane_id, client_id); self.connected_clients.borrow_mut().insert(client_id); self.mode_info.borrow_mut().insert( client_id, |
