fix: (tabs) move to next tab if moving to next pane from fullscreen pane (#3498)

Co-authored-by: Vasilis Manolopoulos <vmanolop@gmail.comh>
This commit is contained in:
Vasileios Manolopoulos 2024-10-25 15:18:29 +02:00 committed by GitHub
parent 499fd64df8
commit 9a2f90936b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 14 deletions

View file

@ -1691,16 +1691,18 @@ impl TiledPanes {
}
}
pub fn focus_pane_left_fullscreen(&mut self, client_id: ClientId) {
pub fn focus_pane_left_fullscreen(&mut self, client_id: ClientId) -> bool {
self.unset_fullscreen();
self.move_focus_left(client_id);
let ret = self.move_focus_left(client_id);
self.toggle_active_pane_fullscreen(client_id);
return ret;
}
pub fn focus_pane_right_fullscreen(&mut self, client_id: ClientId) {
pub fn focus_pane_right_fullscreen(&mut self, client_id: ClientId) -> bool {
self.unset_fullscreen();
self.move_focus_right(client_id);
let ret = self.move_focus_right(client_id);
self.toggle_active_pane_fullscreen(client_id);
return ret;
}
pub fn focus_pane_up_fullscreen(&mut self, client_id: ClientId) {

View file

@ -2052,19 +2052,19 @@ impl Tab {
pub fn are_floating_panes_visible(&self) -> bool {
self.floating_panes.panes_are_visible()
}
pub fn focus_pane_left_fullscreen(&mut self, client_id: ClientId) {
pub fn focus_pane_left_fullscreen(&mut self, client_id: ClientId) -> bool {
if !self.is_fullscreen_active() {
return;
return false;
}
self.tiled_panes.focus_pane_left_fullscreen(client_id);
return self.tiled_panes.focus_pane_left_fullscreen(client_id);
}
pub fn focus_pane_right_fullscreen(&mut self, client_id: ClientId) {
pub fn focus_pane_right_fullscreen(&mut self, client_id: ClientId) -> bool {
if !self.is_fullscreen_active() {
return;
return false;
}
self.tiled_panes.focus_pane_right_fullscreen(client_id);
return self.tiled_panes.focus_pane_right_fullscreen(client_id);
}
pub fn focus_pane_up_fullscreen(&mut self, client_id: ClientId) {
if !self.is_fullscreen_active() {
@ -2401,8 +2401,7 @@ impl Tab {
return Ok(false);
}
if self.tiled_panes.fullscreen_is_active() {
self.focus_pane_left_fullscreen(client_id);
return Ok(true);
return Ok(self.focus_pane_left_fullscreen(client_id));
}
Ok(self.tiled_panes.move_focus_left(client_id))
}
@ -2468,8 +2467,7 @@ impl Tab {
return Ok(false);
}
if self.tiled_panes.fullscreen_is_active() {
self.focus_pane_right_fullscreen(client_id);
return Ok(true);
return Ok(self.focus_pane_right_fullscreen(client_id));
}
Ok(self.tiled_panes.move_focus_right(client_id))
}