Add buffer search history

This commit is contained in:
Kirill Bulatov 2023-07-31 16:40:03 +03:00
parent ef57d444d0
commit 646dabe113
6 changed files with 428 additions and 8 deletions

View file

@ -1128,6 +1128,12 @@ impl AppContext {
self.keystroke_matcher.clear_bindings();
}
pub fn binding_for_action(&self, action: &dyn Action) -> Option<&Binding> {
self.keystroke_matcher
.bindings_for_action(action.id())
.find(|binding| binding.action().eq(action))
}
pub fn default_global<T: 'static + Default>(&mut self) -> &T {
let type_id = TypeId::of::<T>();
self.update(|this| {