Use cmd-b/cmd-r/cmd-j to toggle left/right/bottom dock and focus when opening
Also, bind the same keys with shift to toggle the dock without focusing. Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
7534c4e670
commit
50cfe5eec3
6 changed files with 89 additions and 22 deletions
|
@ -423,6 +423,16 @@ impl View for Dock {
|
|||
Empty::new().into_any()
|
||||
}
|
||||
}
|
||||
|
||||
fn focus_in(&mut self, _: AnyViewHandle, cx: &mut ViewContext<Self>) {
|
||||
if cx.is_self_focused() {
|
||||
if let Some(active_entry) = self.active_entry() {
|
||||
cx.focus(active_entry.panel.as_any());
|
||||
} else {
|
||||
cx.focus_parent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl PanelButtons {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue