Skip to content

Commit

Permalink
fix: add short circuit to set active pane
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Kuruc authored and wez committed Sep 14, 2024
1 parent 78849cc commit bc2f366
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mux/src/tab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1748,6 +1748,12 @@ impl TabInner {
}

fn set_active_pane(&mut self, pane: &Arc<dyn Pane>) {
let prior = self.get_active_pane();

if is_pane(pane, &prior.as_ref()) {
return;
}

if self.zoomed.is_some() {
if !configuration().unzoom_on_switch_pane {
return;
Expand All @@ -1760,7 +1766,6 @@ impl TabInner {
.iter()
.find(|p| p.pane.pane_id() == pane.pane_id())
{
let prior = self.get_active_pane();
self.active = item.index;
self.recency.tag(item.index);
self.advise_focus_change(prior);
Expand Down

0 comments on commit bc2f366

Please sign in to comment.