Fix usage of existing definitions

This commit is contained in:
Keith Simmons 2022-06-27 10:07:44 -07:00
parent a8ea1048cf
commit a0577f5f46

View File

@ -266,14 +266,10 @@ pub fn go_to_fetched_definition(
return;
};
let mut definitions = Vec::new();
editor_handle.update(cx, |editor, cx| {
let definitions = editor_handle.update(cx, |editor, cx| {
let definitions = editor.link_go_to_definition_state.definitions.clone();
hide_link_definition(editor, cx);
std::mem::swap(
&mut editor.link_go_to_definition_state.definitions,
&mut definitions,
);
definitions
});
if !definitions.is_empty() {