Fix logic for activating panel when re-docking it

Max Brunsfeld created

Change summary

crates/workspace2/src/dock.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

crates/workspace2/src/dock.rs 🔗

@@ -317,7 +317,7 @@ impl Dock {
                         new_dock.add_panel(panel.clone(), workspace.clone(), cx);
                         if was_visible {
                             new_dock.set_open(true, cx);
-                            new_dock.activate_panel(this.panels_len() - 1, cx);
+                            new_dock.activate_panel(new_dock.panels_len() - 1, cx);
                         }
                     });
                 }