summaryrefslogtreecommitdiffstats
path: root/zellij-server/src/tab/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'zellij-server/src/tab/mod.rs')
-rw-r--r--zellij-server/src/tab/mod.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/zellij-server/src/tab/mod.rs b/zellij-server/src/tab/mod.rs
index 4134594b6..521e1dbbd 100644
--- a/zellij-server/src/tab/mod.rs
+++ b/zellij-server/src/tab/mod.rs
@@ -1915,6 +1915,15 @@ impl Tab {
}
self.tiled_panes.focus_previous_pane(client_id);
}
+ pub fn focus_pane_on_edge(&mut self, direction: Direction, client_id: ClientId) {
+ let err_context = || format!("failed to move focus left for client {}", client_id);
+
+ if self.floating_panes.panes_are_visible() {
+ self.floating_panes.focus_pane_on_edge(direction, client_id);
+ } else if self.has_selectable_panes() && !self.tiled_panes.fullscreen_is_active() {
+ self.tiled_panes.focus_pane_on_edge(direction, client_id);
+ }
+ }
// returns a boolean that indicates whether the focus moved
pub fn move_focus_left(&mut self, client_id: ClientId) -> Result<bool> {
let err_context = || format!("failed to move focus left for client {}", client_id);