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 <dylwil3@gmail.com>
This commit is contained in:
Anthony Eid 2025-02-24 18:46:13 -05:00 committed by GitHub
parent eda233344c
commit 3ee4edc404
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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| {