edit predictions: Fix predictions bar disappearing while loading (#24582)

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
This commit is contained in:
Agus Zubiaga 2025-02-10 18:49:46 -03:00 committed by GitHub
parent 89e051d650
commit 1f288f7327
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 65 additions and 50 deletions

View file

@ -3671,6 +3671,18 @@ impl Window {
dispatch_tree.bindings_for_action(action, &context_stack)
}
/// Returns the key bindings for the given action in the given context.
pub fn bindings_for_action_in_context(
&self,
action: &dyn Action,
context: KeyContext,
) -> Vec<KeyBinding> {
let dispatch_tree = &self.rendered_frame.dispatch_tree;
dispatch_tree.bindings_for_action(action, &[context])
}
/// Returns a generic event listener that invokes the given listener with the view and context associated with the given view handle.
/// Returns a generic event listener that invokes the given listener with the view and context associated with the given view handle.
pub fn listener_for<V: Render, E>(
&self,