Add cmd-g and cmd-shift-g to jump to next / previous result

I added the action handler on Pane so we can use these bindings when the find bar isn't focused.
This commit is contained in:
Nathan Sobo 2022-01-30 20:59:20 -07:00
parent f90193beea
commit b1639e5677
2 changed files with 16 additions and 1 deletions

View file

@ -417,6 +417,12 @@ impl Pane {
cx.notify();
}
pub fn toolbar<T: Toolbar>(&self) -> Option<ViewHandle<T>> {
self.toolbars
.get(&TypeId::of::<T>())
.and_then(|toolbar| toolbar.to_any().downcast())
}
pub fn active_toolbar(&self) -> Option<AnyViewHandle> {
let type_id = self.active_toolbar_type?;
let toolbar = self.toolbars.get(&type_id)?;