Remove cx param

This commit is contained in:
Conrad Irwin
2023-12-04 23:35:31 +00:00
parent c82fea375d
commit 1c9b984738
7 changed files with 31 additions and 64 deletions
-1
View File
@@ -3640,7 +3640,6 @@ impl Editor {
}
pub fn toggle_code_actions(&mut self, action: &ToggleCodeActions, cx: &mut ViewContext<Self>) {
dbg!("TOGGLE CODE ACTIONS");
let mut context_menu = self.context_menu.write();
if matches!(context_menu.as_ref(), Some(ContextMenu::CodeActions(_))) {
*context_menu = None;
+5 -6
View File
@@ -37,19 +37,18 @@ pub fn deploy_context_menu(
});
let context_menu = ui::ContextMenu::build(cx, |menu, cx| {
menu.action("Rename Symbol", Box::new(Rename), cx)
.action("Go to Definition", Box::new(GoToDefinition), cx)
.action("Go to Type Definition", Box::new(GoToTypeDefinition), cx)
.action("Find All References", Box::new(FindAllReferences), cx)
menu.action("Rename Symbol", Box::new(Rename))
.action("Go to Definition", Box::new(GoToDefinition))
.action("Go to Type Definition", Box::new(GoToTypeDefinition))
.action("Find All References", Box::new(FindAllReferences))
.action(
"Code Actions",
Box::new(ToggleCodeActions {
deployed_from_indicator: false,
}),
cx,
)
.separator()
.action("Reveal in Finder", Box::new(RevealInFinder), cx)
.action("Reveal in Finder", Box::new(RevealInFinder))
});
let context_menu_focus = context_menu.focus_handle(cx);
cx.focus(&context_menu_focus);