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.

snippets: Fix `configure snippets` not opening on remote workspaces (#38790)

loczeke13b88e4bd4d
diff --git a/crates/snippets_ui/src/snippets_ui.rs b/crates/snippets_ui/src/snippets_ui.rs
index 7f2689f0be7..cfe41144ba9 100644
--- a/crates/snippets_ui/src/snippets_ui.rs
+++ b/crates/snippets_ui/src/snippets_ui.rs
@@ -221,15 +221,19 @@ impl PickerDelegate for ScopeSelectorDelegate {
workspace.update_in(cx, |workspace, window, cx| {
workspace
- .open_abs_path(
- snippets_dir().join(scope_file_name.with_extension()),
- OpenOptions {
- visible: Some(OpenVisible::None),
- ..Default::default()
- },
- window,
- cx,
- )
+ .with_local_workspace(window, cx, |workspace, window, cx| {
+ workspace
+ .open_abs_path(
+ snippets_dir().join(scope_file_name.with_extension()),
+ OpenOptions {
+ visible: Some(OpenVisible::None),
+ ..Default::default()
+ },
+ window,
+ cx,
+ )
+ .detach();
+ })
.detach();
})
})