Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix repeatedly docking project panel (#11884)

CharlesChen0823a0d7ec9f8e70
diff --git a/crates/workspace/src/dock.rs b/crates/workspace/src/dock.rs
index a304ef4a639..d84aace8f92 100644
--- a/crates/workspace/src/dock.rs
+++ b/crates/workspace/src/dock.rs
@@ -373,6 +373,7 @@ impl Dock {
this.remove_panel(&panel, cx);
new_dock.update(cx, |new_dock, cx| {
+ new_dock.remove_panel(&panel, cx);
new_dock.add_panel(panel.clone(), workspace.clone(), cx);
if was_visible {
new_dock.set_open(true, cx);