Display the first keystroke instead of an error for multi-keystroke binding (#31456)
Jakub Sygnowski
and
Ben Kunkle
created
Ideally we would show multi-keystroke binding, but I'd say this improves
over the status quo.
A partial solution to #27334
Release Notes:
- Fixed spurious warning for lack of edit prediction on multi-keystroke
binding
Co-authored-by: Ben Kunkle <ben@zed.dev>
@@ -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