mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 02:48:34 +00:00
Added focus on dock toggle
This commit is contained in:
parent
61ec334234
commit
4c07dc9553
1 changed files with 3 additions and 0 deletions
|
@ -152,7 +152,10 @@ impl Dock {
|
|||
let pane = workspace.dock.pane.clone();
|
||||
if pane.read(cx).items().next().is_none() {
|
||||
let item_to_add = (workspace.dock.default_item_factory)(workspace, cx);
|
||||
// Adding the item focuses the pane by default
|
||||
Pane::add_item(workspace, &pane, item_to_add, true, true, None, cx);
|
||||
} else {
|
||||
cx.focus(pane);
|
||||
}
|
||||
} else if let Some(last_active_center_pane) = workspace.last_active_center_pane.clone() {
|
||||
cx.focus(last_active_center_pane);
|
||||
|
|
Loading…
Reference in a new issue