Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
pane: Turn off preview mode when pinning a tab (#22501)
Hayashi Mikihiro44af405fb0c4
diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rsindex 3f768431810..33808ffb3cf 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));