Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
pane: Update pinned tab count when it exceeds actual tab count (#33405)
vipex8f9817173d74
diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rsindex 9644ef9e796..5c04912d6b0 100644--- a/crates/workspace/src/pane.rs+++ b/crates/workspace/src/pane.rs@@ -2784,7 +2784,7 @@ impl Pane {}).collect::<Vec<_>>();let tab_count = tab_items.len();- let safe_pinned_count = if self.pinned_tab_count > tab_count {+ if self.pinned_tab_count > tab_count {log::warn!("Pinned tab count ({}) exceeds actual tab count ({}). \This should not happen. If possible, add reproduction steps, \@@ -2792,11 +2792,9 @@ impl Pane {self.pinned_tab_count,tab_count);- tab_count- } else {- self.pinned_tab_count- };- let unpinned_tabs = tab_items.split_off(safe_pinned_count);+ self.pinned_tab_count = tab_count;+ }+ let unpinned_tabs = tab_items.split_off(self.pinned_tab_count);let pinned_tabs = tab_items;TabBar::new("tab_bar").when(