@@ -488,18 +488,21 @@ impl ProjectPicker {
})
.log_err();
- let options = cx
- .update(|_, cx| (app_state.build_window_options)(None, cx))
- .log_err()?;
- let window = cx
- .open_window(options, |window, cx| {
+ let window = if create_new_window {
+ let options = cx
+ .update(|_, cx| (app_state.build_window_options)(None, cx))
+ .log_err()?;
+ cx.open_window(options, |window, cx| {
let workspace = cx.new(|cx| {
telemetry::event!("SSH Project Created");
Workspace::new(None, project.clone(), app_state.clone(), window, cx)
});
cx.new(|cx| MultiWorkspace::new(workspace, window, cx))
})
- .log_err()?;
+ .log_err()
+ } else {
+ cx.window_handle().downcast::<MultiWorkspace>()
+ }?;
let items = open_remote_project_with_existing_connection(
connection, project, paths, app_state, window, None, cx,