fix: add short circuit to set active pane

This commit is contained in:
Greg Kuruc authored and Wez Furlong committed 2024-09-14 11:43:32 -07:00
1 parent 78849cc478
commit bc2f3668a6
1 file changed
+6 -1
+6 -1
View File
@@ -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;
@@ -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);