Add basic test for editor context menu

This commit is contained in:
Keith Simmons
2022-07-13 14:13:19 -07:00
committed by K Simmons
parent b850e41d6f
commit 5366ed4404
2 changed files with 47 additions and 0 deletions
+4
View File
@@ -124,6 +124,10 @@ impl ContextMenu {
}
}
pub fn visible(&self) -> bool {
self.visible
}
fn action_dispatched(&mut self, action_id: TypeId, cx: &mut ViewContext<Self>) {
if let Some(ix) = self
.items