Rebind ctrl-
` to toggle terminal panel focus
Also, add `ctrl-~` to create new terminals. Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
parent
747fbfadeb
commit
f097444546
5 changed files with 42 additions and 34 deletions
|
@ -176,6 +176,12 @@ impl Dock {
|
|||
.map_or(false, |panel| panel.has_focus(cx))
|
||||
}
|
||||
|
||||
pub fn panel_index<T: Panel>(&self) -> Option<usize> {
|
||||
self.panel_entries
|
||||
.iter()
|
||||
.position(|entry| entry.panel.as_any().is::<T>())
|
||||
}
|
||||
|
||||
pub fn active_panel_index(&self) -> usize {
|
||||
self.active_panel_index
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue