Hide editor hovers when a menu is open (#4200)

Release Notes:

- Fixed a bug where editor hover state could appear while menu open
([#2384](https://github.com/zed-industries/community/issues/2384)).
This commit is contained in:
Conrad Irwin 2024-01-22 14:41:03 -07:00 committed by GitHub
commit 43c21925ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2153,14 +2153,18 @@ impl EditorElement {
.max(MIN_POPOVER_LINE_HEIGHT * line_height), // Apply minimum height of 4 lines .max(MIN_POPOVER_LINE_HEIGHT * line_height), // Apply minimum height of 4 lines
); );
let hover = editor.hover_state.render( let hover = if context_menu.is_some() {
None
} else {
editor.hover_state.render(
&snapshot, &snapshot,
&style, &style,
visible_rows, visible_rows,
max_size, max_size,
editor.workspace.as_ref().map(|(w, _)| w.clone()), editor.workspace.as_ref().map(|(w, _)| w.clone()),
cx, cx,
); )
};
let editor_view = cx.view().clone(); let editor_view = cx.view().clone();
let fold_indicators = cx.with_element_context(|cx| { let fold_indicators = cx.with_element_context(|cx| {