Clear hover background highlights

Antonio Scandurra and Piotr created

Co-Authored-By: Piotr <piotr@zed.dev>

Change summary

crates/editor2/src/element.rs       | 5 +++--
crates/editor2/src/hover_popover.rs | 3 +--
2 files changed, 4 insertions(+), 4 deletions(-)

Detailed changes

crates/editor2/src/element.rs 🔗

@@ -412,12 +412,13 @@ impl EditorElement {
                     );
                 }
             }
+
+            true
         } else {
             update_go_to_definition_link(editor, None, modifiers.command, modifiers.shift, cx);
             hover_at(editor, None, cx);
+            false
         }
-
-        true
     }
 
     fn scroll(

crates/editor2/src/hover_popover.rs 🔗

@@ -144,8 +144,7 @@ pub fn hide_hover(editor: &mut Editor, cx: &mut ViewContext<Editor>) -> bool {
     editor.hover_state.info_task = None;
     editor.hover_state.triggered_from = None;
 
-    // todo!()
-    // editor.clear_background_highlights::<HoverState>(cx);
+    editor.clear_background_highlights::<HoverState>(cx);
 
     if did_hide {
         cx.notify();