From 037df8cec5b148b9c5a98960301d23807e0556fd Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Sat, 7 Jun 2025 15:15:30 -0400 Subject: [PATCH] Simplify logic updating pinned tab count (#32310) Just a tiny improvement to clean up the logic Release Notes: - N/A --- crates/workspace/src/pane.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index c5d13a4a35..53ad695005 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -2925,15 +2925,9 @@ impl Pane { let ix = if moved_right { ix - 1 } else { ix }; let is_pinned_in_to_pane = this.is_tab_pinned(ix); - if (was_pinned_in_from_pane && is_pinned_in_to_pane) - || (!was_pinned_in_from_pane && !is_pinned_in_to_pane) - { - return; - } - - if is_pinned_in_to_pane { + if !was_pinned_in_from_pane && is_pinned_in_to_pane { this.pinned_tab_count += 1; - } else { + } else if was_pinned_in_from_pane && !is_pinned_in_to_pane { this.pinned_tab_count -= 1; } } else if this.items.len() >= to_pane_old_length {