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:
@@ -192,8 +192,8 @@ impl DispatchTree {
|
|||||||
keymap
|
keymap
|
||||||
.bindings_for_action(action)
|
.bindings_for_action(action)
|
||||||
.filter(|binding| {
|
.filter(|binding| {
|
||||||
for i in 1..context_stack.len() {
|
for i in 0..context_stack.len() {
|
||||||
let context = &context_stack[0..i];
|
let context = &context_stack[0..=i];
|
||||||
if keymap.binding_enabled(binding, context) {
|
if keymap.binding_enabled(binding, context) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user