A simple CPU rendered GUI IDE experience.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 75766d2..c45a9e4 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -980,7 +980,14 @@ hovering.request = (DropH::new(handle), cursor_position).into();
);
}
Some(Do::GoToDefinition) => {
-
+ if let Some(LocationLink {
+ ref target_uri,
+ target_range, .. }) = def.result && let Some((l, p)) = lsp!() {
+ if target_uri == &p.tid().uri {
+ text.cursor = text.l_position(target_range.start).unwrap();
+ text.scroll_to_cursor();
+ }
+ }
}
None => {}
_ => unreachable!(),