Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
clangd: Fix switch source header action on windows (#42105)
Lukas Wirth9c8e37a15658
diff --git a/crates/editor/src/clangd_ext.rs b/crates/editor/src/clangd_ext.rsindex 17ed5222113..49936580987 100644--- a/crates/editor/src/clangd_ext.rs+++ b/crates/editor/src/clangd_ext.rs@@ -88,10 +88,14 @@ pub fn switch_source_header()})?;- let path = PathBuf::from(goto);-workspace.update_in(cx, |workspace, window, cx| {+ let goto = if workspace.path_style(cx).is_windows() {+ goto.strip_prefix('/').unwrap_or(goto)+ } else {+ goto+ };+ let path = PathBuf::from(goto);workspace.open_abs_path(path,OpenOptions {