diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 2bf9655647..19226c6472 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -427,9 +427,14 @@ impl EditorElement { let content_origin = bounds.origin() + vec2f(layout.gutter_margin, 0.); cx.scene.push_layer(Some(bounds)); + cx.scene.push_cursor_region(CursorRegion { bounds, - style: CursorStyle::IBeam, + style: if !view.link_go_to_definition_state.definitions.is_empty() { + CursorStyle::PointingHand + } else { + CursorStyle::IBeam + }, }); for (range, color) in &layout.highlighted_ranges { diff --git a/crates/editor/src/link_go_to_definition.rs b/crates/editor/src/link_go_to_definition.rs index ab8e365571..1f28935039 100644 --- a/crates/editor/src/link_go_to_definition.rs +++ b/crates/editor/src/link_go_to_definition.rs @@ -237,8 +237,11 @@ pub fn show_link_definition( } pub fn hide_link_definition(editor: &mut Editor, cx: &mut ViewContext) { - if editor.link_go_to_definition_state.symbol_range.is_some() { + if editor.link_go_to_definition_state.symbol_range.is_some() + || !editor.link_go_to_definition_state.definitions.is_empty() + { editor.link_go_to_definition_state.symbol_range.take(); + editor.link_go_to_definition_state.definitions.clear(); cx.notify(); }