From 602ae845427cdff69959acb3b16ec6303810c7ad Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Wed, 16 Apr 2025 15:02:37 -0600 Subject: [PATCH] Fix the buttons not working in key context view (#28910) Release Notes: - N/A --- crates/language_tools/src/key_context_view.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/crates/language_tools/src/key_context_view.rs b/crates/language_tools/src/key_context_view.rs index ec65ccdbe8..9fec3b4cf2 100644 --- a/crates/language_tools/src/key_context_view.rs +++ b/crates/language_tools/src/key_context_view.rs @@ -206,12 +206,12 @@ impl Render for KeyContextView { .mt_4() .gap_4() .child( - Button::new("default", "Open Documentation") + Button::new("open_documentation", "Open Documentation") .style(ButtonStyle::Filled) .on_click(|_, _, cx| cx.open_url("https://zed.dev/docs/key-bindings")), ) .child( - Button::new("default", "View default keymap") + Button::new("view_default_keymap", "View default keymap") .style(ButtonStyle::Filled) .key_binding(ui::KeyBinding::for_action( &zed_actions::OpenDefaultKeymap, @@ -219,16 +219,14 @@ impl Render for KeyContextView { cx )) .on_click(|_, window, cx| { - window.dispatch_action(workspace::SplitRight.boxed_clone(), cx); window.dispatch_action(zed_actions::OpenDefaultKeymap.boxed_clone(), cx); }), ) .child( - Button::new("default", "Edit your keymap") + Button::new("edit_your_keymap", "Edit your keymap") .style(ButtonStyle::Filled) .key_binding(ui::KeyBinding::for_action(&zed_actions::OpenKeymap, window, cx)) .on_click(|_, window, cx| { - window.dispatch_action(workspace::SplitRight.boxed_clone(), cx); window.dispatch_action(zed_actions::OpenKeymap.boxed_clone(), cx); }), ),