Fix usage of existing definitions
This commit is contained in:
@@ -266,14 +266,10 @@ pub fn go_to_fetched_definition(
|
|||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut definitions = Vec::new();
|
let definitions = editor_handle.update(cx, |editor, cx| {
|
||||||
|
let definitions = editor.link_go_to_definition_state.definitions.clone();
|
||||||
editor_handle.update(cx, |editor, cx| {
|
|
||||||
hide_link_definition(editor, cx);
|
hide_link_definition(editor, cx);
|
||||||
std::mem::swap(
|
definitions
|
||||||
&mut editor.link_go_to_definition_state.definitions,
|
|
||||||
&mut definitions,
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if !definitions.is_empty() {
|
if !definitions.is_empty() {
|
||||||
|
|||||||
Reference in New Issue
Block a user