Fix the buttons not working in key context view (#28910)
Release Notes: - N/A
This commit is contained in:
parent
3fef3cc392
commit
602ae84542
1 changed files with 3 additions and 5 deletions
|
@ -206,12 +206,12 @@ impl Render for KeyContextView {
|
||||||
.mt_4()
|
.mt_4()
|
||||||
.gap_4()
|
.gap_4()
|
||||||
.child(
|
.child(
|
||||||
Button::new("default", "Open Documentation")
|
Button::new("open_documentation", "Open Documentation")
|
||||||
.style(ButtonStyle::Filled)
|
.style(ButtonStyle::Filled)
|
||||||
.on_click(|_, _, cx| cx.open_url("https://zed.dev/docs/key-bindings")),
|
.on_click(|_, _, cx| cx.open_url("https://zed.dev/docs/key-bindings")),
|
||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
Button::new("default", "View default keymap")
|
Button::new("view_default_keymap", "View default keymap")
|
||||||
.style(ButtonStyle::Filled)
|
.style(ButtonStyle::Filled)
|
||||||
.key_binding(ui::KeyBinding::for_action(
|
.key_binding(ui::KeyBinding::for_action(
|
||||||
&zed_actions::OpenDefaultKeymap,
|
&zed_actions::OpenDefaultKeymap,
|
||||||
|
@ -219,16 +219,14 @@ impl Render for KeyContextView {
|
||||||
cx
|
cx
|
||||||
))
|
))
|
||||||
.on_click(|_, window, cx| {
|
.on_click(|_, window, cx| {
|
||||||
window.dispatch_action(workspace::SplitRight.boxed_clone(), cx);
|
|
||||||
window.dispatch_action(zed_actions::OpenDefaultKeymap.boxed_clone(), cx);
|
window.dispatch_action(zed_actions::OpenDefaultKeymap.boxed_clone(), cx);
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
Button::new("default", "Edit your keymap")
|
Button::new("edit_your_keymap", "Edit your keymap")
|
||||||
.style(ButtonStyle::Filled)
|
.style(ButtonStyle::Filled)
|
||||||
.key_binding(ui::KeyBinding::for_action(&zed_actions::OpenKeymap, window, cx))
|
.key_binding(ui::KeyBinding::for_action(&zed_actions::OpenKeymap, window, cx))
|
||||||
.on_click(|_, window, cx| {
|
.on_click(|_, window, cx| {
|
||||||
window.dispatch_action(workspace::SplitRight.boxed_clone(), cx);
|
|
||||||
window.dispatch_action(zed_actions::OpenKeymap.boxed_clone(), cx);
|
window.dispatch_action(zed_actions::OpenKeymap.boxed_clone(), cx);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue