From 22d75b798e192290e931966daed00c28b391baef Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Mon, 2 Jun 2025 02:58:57 -0400 Subject: [PATCH] Notify when pinning a tab even if the tab isn't moved (#31880) The optimization to not move a tab being pinned (when the destination index is the same as its index) in https://github.com/zed-industries/zed/pull/31871 caused a regression, as we were no longer calling `cx.notify()` indirectly through `move_item`. Thanks for catching this, @smitbarmase. Release Notes: - N/A --- crates/workspace/src/pane.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 6b109b98ff3ffff0ee4d7661664a06306c1c7d45..aedccd232c1c2e22445ca7aae4b83265a435f73a 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -2063,7 +2063,9 @@ impl Pane { self.set_preview_item_id(None, cx); } - if ix != destination_index { + if ix == destination_index { + cx.notify(); + } else { self.workspace .update(cx, |_, cx| { cx.defer_in(window, move |_, window, cx| {