diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 3424a726973e36443be85bb27d32a313c7053bf4..ed8e0c9cc84c06e8fd258bf8c0656e975c807945 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -2261,6 +2261,8 @@ impl Editor { window.bindings_for_action_in_context(&AcceptEditPrediction, key_context) }; + // TODO: if the binding contains multiple keystrokes, display all of them, not + // just the first one. AcceptEditPredictionBinding(bindings.into_iter().rev().find(|binding| { !in_conflict || binding diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 33371b5c6af02fd1d1c242f53463e2aef51a3071..073aac287377e93c3e568f3a710f481f35b4ee67 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -6666,7 +6666,7 @@ impl AcceptEditPredictionBinding { pub fn keystroke(&self) -> Option<&Keystroke> { if let Some(binding) = self.0.as_ref() { match &binding.keystrokes() { - [keystroke] => Some(keystroke), + [keystroke, ..] => Some(keystroke), _ => None, } } else {