Fix context key matching

* You need to check all layers of the context stack
* When in command, the context should be based on where focus was (to
  match `available_actions`.
This commit is contained in:
Conrad Irwin 2023-12-04 21:28:37 +00:00
parent 3627ff87f0
commit 2c2e5144c9
4 changed files with 54 additions and 12 deletions

View file

@ -311,7 +311,11 @@ impl PickerDelegate for CommandPaletteDelegate {
command.name.clone(),
r#match.positions.clone(),
))
.children(KeyBinding::for_action(&*command.action, cx)),
.children(KeyBinding::for_action_in(
&*command.action,
&self.previous_focus_handle,
cx,
)),
),
)
}