Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
editor: Allow clicking on excerpts with alt key to open file path (#42235)
Anthony Eid309947aa5385
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rsindex da0f61bf42d..d30ead9126b 100644--- a/crates/editor/src/element.rs+++ b/crates/editor/src/element.rs@@ -4093,7 +4093,17 @@ impl EditorElement {.on_mouse_down(MouseButton::Left, |_, _, cx| cx.stop_propagation()).on_click(window.listener_for(&self.editor, {let buffer_id = for_excerpt.buffer_id;- move |editor, _e: &ClickEvent, _window, cx| {+ move |editor, e: &ClickEvent, window, cx| {+ if e.modifiers().alt {+ editor.open_excerpts_common(+ Some(jump_data.clone()),+ e.modifiers().secondary(),+ window,+ cx,+ );+ return;+ }+if is_folded {editor.unfold_buffer(buffer_id, cx);} else {