mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-03 23:27:59 +00:00
Fix off by 1 error when computing available key bindings (#3964)
Fixes https://github.com/zed-industries/community/issues/2379 Release Notes: - Fixed issue where keybindings in some context menus would not show reliably.
This commit is contained in:
commit
6982b4b42e
1 changed files with 2 additions and 2 deletions
|
@ -192,8 +192,8 @@ impl DispatchTree {
|
|||
keymap
|
||||
.bindings_for_action(action)
|
||||
.filter(|binding| {
|
||||
for i in 1..context_stack.len() {
|
||||
let context = &context_stack[0..i];
|
||||
for i in 0..context_stack.len() {
|
||||
let context = &context_stack[0..=i];
|
||||
if keymap.binding_enabled(binding, context) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue