From 3ee4edc404e73bed35286bf2131798b4879d2dba Mon Sep 17 00:00:00 2001 From: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com> Date: Mon, 24 Feb 2025 18:46:13 -0500 Subject: [PATCH] Fix go to definition split (#24990) Closes #24982 Release Notes: - Fix `GoToDefinitionSplit` action bug where split wouldn't happen if definition was in the same active editor --------- Co-authored-by: Dylan --- crates/editor/src/editor.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 67fdc790c0..44d659addb 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -11600,7 +11600,9 @@ impl Editor { let range = editor.range_for_match(&range); let range = collapse_multiline_range(range); - if Some(&target.buffer) == editor.buffer.read(cx).as_singleton().as_ref() { + if !split + && Some(&target.buffer) == editor.buffer.read(cx).as_singleton().as_ref() + { editor.go_to_singleton_buffer_range(range.clone(), window, cx); } else { window.defer(cx, move |window, cx| {