diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 3f76843181005893a317e52c7521b092896b6ccb..33808ffb3cfe3fada03f6627d1df0c19700f3e81 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -1961,6 +1961,10 @@ impl Pane { self.pinned_tab_count += 1; let id = self.item_for_index(ix)?.item_id(); + if self.is_active_preview_item(id) { + self.set_preview_item_id(None, cx); + } + self.workspace .update(cx, |_, cx| { cx.defer(move |_, cx| move_item(&pane, &pane, id, destination_index, cx));