From 309947aa5385e815111c09d39d6764ee52873469 Mon Sep 17 00:00:00 2001 From: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com> Date: Fri, 7 Nov 2025 16:23:55 -0500 Subject: [PATCH] editor: Allow clicking on excerpts with alt key to open file path (#42235) #42021 Made clicking on an excerpt title toggle it. This PR brings back the old behavior if a user is pressing the Alt key when clicking on an excerpt title. Release Notes: - N/A --------- Co-authored-by: Remco Smits --- crates/editor/src/element.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index da0f61bf42d71049dbe894af86687c11c84e53b4..d30ead9126b35e183ee1a16d9020ef5766eeedab 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 {