assistant: Grab focus when clicking on history icon
This commit is contained in:
parent
389cb86e43
commit
f3abb7e724
1 changed files with 7 additions and 3 deletions
|
@ -363,9 +363,13 @@ impl AssistantPanel {
|
||||||
pane.set_render_tab_bar_buttons(cx, move |pane, cx| {
|
pane.set_render_tab_bar_buttons(cx, move |pane, cx| {
|
||||||
let focus_handle = pane.focus_handle(cx);
|
let focus_handle = pane.focus_handle(cx);
|
||||||
let left_children = IconButton::new("history", IconName::TextSearch)
|
let left_children = IconButton::new("history", IconName::TextSearch)
|
||||||
.on_click(
|
.on_click(cx.listener({
|
||||||
cx.listener(|_, _, cx| cx.dispatch_action(DeployHistory.boxed_clone())),
|
let focus_handle = focus_handle.clone();
|
||||||
)
|
move |_, _, cx| {
|
||||||
|
focus_handle.focus(cx);
|
||||||
|
cx.dispatch_action(DeployHistory.boxed_clone())
|
||||||
|
}
|
||||||
|
}))
|
||||||
.tooltip(move |cx| {
|
.tooltip(move |cx| {
|
||||||
cx.new_view(|cx| {
|
cx.new_view(|cx| {
|
||||||
let keybind =
|
let keybind =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue