Fix right click handler for tabs

Also, some fun test helpers

Co-Authored-By: Mikayla <mikayla@zed.dev>
This commit is contained in:
Conrad Irwin 2024-01-18 12:07:52 -07:00
parent 7b9e7fea4e
commit 920eced1d5
9 changed files with 116 additions and 11 deletions

View file

@ -303,6 +303,7 @@ impl Render for ContextMenu {
.w_full()
.justify_between()
.child(label_element)
.debug_selector(|| format!("MENU_ITEM-{}", label))
.children(action.as_ref().and_then(|action| {
KeyBinding::for_action(&**action, cx)
.map(|binding| div().ml_1().child(binding))