From 3cea7ccbff438c331ce6e11cd9de78a7c3b1e1b0 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Tue, 10 Sep 2024 17:26:06 -0400 Subject: [PATCH] pane: Fix pinned tabs being persisted after closing (#17666) Release Notes: - Fixed tabs staying pinned after closing unrelated tabs --- crates/workspace/src/pane.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index e2a77402de..23148d6376 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -1364,6 +1364,9 @@ impl Pane { self.activation_history .retain(|entry| entry.entity_id != self.items[item_index].item_id()); + if self.is_tab_pinned(item_index) { + self.pinned_tab_count -= 1; + } if item_index == self.active_item_index { let index_to_activate = self .activation_history