From b1cd20a4356758fdcf46eddb2d99135df8287183 Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Thu, 10 Jul 2025 17:42:34 -0400 Subject: [PATCH] Remove all debug logging from inlay hint hover implementation --- crates/editor/src/element.rs | 3 --- crates/editor/src/hover_popover.rs | 20 -------------------- 2 files changed, 23 deletions(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 3f0aa887ef..d4cd126f32 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -1222,7 +1222,6 @@ impl EditorElement { // Don't trigger hover popover if mouse is hovering over context menu if text_hovered { - eprintln!("mouse_moved: text_hovered=true, calling update_hovered_link"); editor.update_hovered_link( point_for_position, &position_map.snapshot, @@ -1236,11 +1235,9 @@ impl EditorElement { .snapshot .buffer_snapshot .anchor_before(point.to_offset(&position_map.snapshot, Bias::Left)); - eprintln!("mouse_moved: Valid text position, calling hover_at with anchor"); hover_at(editor, Some(anchor), window, cx); Self::update_visible_cursor(editor, point, position_map, window, cx); } else { - eprintln!("mouse_moved: Invalid position (inlay?), NOT calling hover_at"); // Don't call hover_at with None when we're over an inlay // The inlay hover is already handled by update_hovered_link } diff --git a/crates/editor/src/hover_popover.rs b/crates/editor/src/hover_popover.rs index 6072c5d5f3..39ae7c7bde 100644 --- a/crates/editor/src/hover_popover.rs +++ b/crates/editor/src/hover_popover.rs @@ -48,10 +48,6 @@ pub fn hover_at( window: &mut Window, cx: &mut Context, ) { - eprintln!( - "hover_at called with anchor: {}", - if anchor.is_some() { "Some" } else { "None" } - ); if EditorSettings::get_global(cx).hover_popover_enabled { if show_keyboard_hover(editor, window, cx) { return; @@ -216,7 +212,6 @@ pub fn hover_at_inlay( /// Triggered by the `Hover` action when the cursor is not over a symbol or when the /// selections changed. pub fn hide_hover(editor: &mut Editor, cx: &mut Context) -> bool { - eprintln!("hide_hover called"); let info_popovers = editor.hover_state.info_popovers.drain(..); let diagnostics_popover = editor.hover_state.diagnostic_popover.take(); let did_hide = info_popovers.count() > 0 || diagnostics_popover.is_some(); @@ -791,12 +786,6 @@ impl HoverState { window: &mut Window, cx: &mut Context, ) -> Option<(DisplayPoint, Vec)> { - let visible = self.visible(); - eprintln!( - "HoverState::render - visible: {}, info_popovers: {}", - visible, - self.info_popovers.len() - ); // If there is a diagnostic, position the popovers based on that. // Otherwise use the start of the hover range let anchor = self @@ -820,18 +809,9 @@ impl HoverState { }) })?; let point = anchor.to_display_point(&snapshot.display_snapshot); - eprintln!( - "HoverState::render - point: {:?}, visible_rows: {:?}", - point, visible_rows - ); // Don't render if the relevant point isn't on screen if !self.visible() || !visible_rows.contains(&point.row()) { - eprintln!( - "HoverState::render - Not rendering: visible={}, point_in_range={}", - self.visible(), - visible_rows.contains(&point.row()) - ); return None; }