editor: Hide hover popover when code actions context menu is triggered (#31042)
This PR hides hover info/diagnostic popovers when code action menu is shown. We already hide hover info/diagnostic popover on code completion menu trigger (handled on input). Note: It is still possible to see hover popover if code completion or code action menu is already open. This is intended behavior. - [x] Test hover popover hides when code action is triggered Release Notes: - Fixed issue where info and diagnostic hover popovers were still visible when code action menu is triggered.
This commit is contained in:
parent
4bb04cef9d
commit
d547a86e31
2 changed files with 144 additions and 1 deletions
|
@ -5081,7 +5081,7 @@ impl Editor {
|
|||
if editor.focus_handle.is_focused(window) && menu.is_some() {
|
||||
let mut menu = menu.unwrap();
|
||||
menu.resolve_visible_completions(editor.completion_provider.as_deref(), cx);
|
||||
|
||||
crate::hover_popover::hide_hover(editor, cx);
|
||||
*editor.context_menu.borrow_mut() =
|
||||
Some(CodeContextMenu::Completions(menu));
|
||||
|
||||
|
@ -5512,6 +5512,7 @@ impl Editor {
|
|||
.map_or(true, |actions| actions.is_empty())
|
||||
&& debug_scenarios.is_empty();
|
||||
if let Ok(task) = editor.update_in(cx, |editor, window, cx| {
|
||||
crate::hover_popover::hide_hover(editor, cx);
|
||||
*editor.context_menu.borrow_mut() =
|
||||
Some(CodeContextMenu::CodeActions(CodeActionsMenu {
|
||||
buffer,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue