Michael Sloan
d801b7b12e
Fix bindings_for_action handling of shadowed key bindings ( #32220 )
...
Fixes two things:
* ~3 months ago [in PR
#26420 ](https://github.com/zed-industries/zed/pull/26420/files#diff-33b58aa2da03d791c2c4761af6012851b7400e348922d64babe5fd48ac2a8e60 )
`bindings_for_action` was changed to return bindings even when they are
shadowed (when the keystrokes would actually do something else).
* For edit prediction keybindings there was some odd behavior where
bindings for `edit_prediction_conflict` were taking precedence over
bindings for `edit_prediction` even when the `edit_prediction_conflict`
predicate didn't match. The workaround for this was #24812 . The way it
worked was:
- List all bindings for the action
- For each binding, get the highest precedence binding with the same
input sequence
- If the highest precedence binding has the same action, include this
binding. This was the bug - this meant that if a binding in the keymap
has the same keystrokes and action it can incorrectly take display
precedence even if its context predicate does not pass.
- Fix is to check that the highest precedence binding is a full match.
To do this efficiently, it's based on an index within the keymap
bindings.
Also adds `highest_precedence_binding_*` variants which avoid the
inefficiency of building lists of bindings just to use the last.
Release Notes:
- Fixed display of keybindings to skip bindings that are shadowed by a
binding that uses the same keystrokes.
- Fixed display of `editor::AcceptEditPrediction` bindings to use the
normal precedence that prioritizes user bindings.
2025-06-06 06:24:59 +00:00
..
2025-05-29 01:58:40 +00:00
2025-06-05 19:15:06 +00:00
2025-06-03 15:59:46 +00:00
2025-05-22 21:00:54 +00:00
2025-05-16 05:04:36 -04:00
2025-05-20 23:06:07 +00:00
2025-06-05 19:15:06 +00:00
2025-05-21 09:27:54 +00:00
2025-05-26 11:48:50 -04:00
2025-06-06 05:23:25 +00:00
2025-06-05 21:30:05 +00:00
2025-05-26 21:20:41 -03:00
2025-05-28 11:51:21 -04:00
2025-05-20 23:06:07 +00:00
2025-05-30 08:29:52 +00:00
2025-04-02 13:26:34 -07:00
2025-06-04 10:41:12 +03:00
2025-05-30 08:32:54 -07:00
2025-05-26 11:48:50 -04:00
2025-05-26 23:04:31 -04:00
2025-06-04 16:56:33 +00:00
2025-05-20 23:06:07 +00:00
2025-05-26 23:04:31 -04:00
2025-05-04 08:28:39 +00:00
2025-06-05 19:42:52 +00:00
2025-06-05 19:15:06 +00:00
2025-04-02 13:26:34 -07:00
2025-06-04 19:18:12 +00:00
2025-04-02 13:26:34 -07:00
2025-06-05 12:59:22 +00:00
2025-05-26 10:29:45 +02:00
2025-06-05 19:42:52 +00:00
2025-04-02 13:26:34 -07:00
2025-06-04 01:37:25 +02:00
2025-06-04 01:37:25 +02:00
2025-05-20 00:20:00 +00:00
2025-05-22 07:24:46 -04:00
2025-05-14 11:15:27 +02:00
2025-06-05 19:15:06 +00:00
2025-05-20 23:06:07 +00:00
2025-06-05 19:42:52 +00:00
2025-06-04 19:18:12 +00:00
2025-06-06 06:24:59 +00:00
2025-06-05 10:36:55 +00:00
2025-05-26 16:06:38 +02:00
2025-05-26 16:06:38 +02:00
2025-05-20 23:06:07 +00:00
2025-06-02 22:19:09 +00:00
2025-06-03 20:35:25 +00:00
2025-05-17 16:42:45 +00:00
2025-05-23 14:53:53 +00:00
2025-06-03 20:35:25 +00:00
2025-04-02 13:26:34 -07:00
2025-06-04 19:54:24 +02:00
2025-04-02 13:26:34 -07:00
2025-05-12 14:43:14 +00:00
2025-06-03 12:23:01 -04:00
2025-06-03 12:23:01 -04:00
2025-06-05 17:12:17 +00:00
2025-06-03 09:41:45 +02:00
2025-06-05 19:30:34 +00:00
2025-06-06 06:24:59 +00:00
2025-05-26 17:43:57 +00:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-05-20 23:06:07 +00:00
2025-04-02 13:26:34 -07:00
2025-06-03 15:20:25 -03:00
2025-06-03 13:18:29 +02:00
2025-05-20 23:06:07 +00:00
2025-05-20 23:06:07 +00:00
2025-05-27 21:52:42 +00:00
2025-06-05 19:15:06 +00:00
2025-05-20 23:06:07 +00:00
2025-05-17 16:42:45 +00:00
2025-05-17 16:42:45 +00:00
2025-04-23 20:54:09 +00:00
2025-06-05 19:42:52 +00:00
2025-05-08 14:01:39 +02:00
2025-06-04 14:07:01 +00:00
2025-06-05 19:30:34 +00:00
2025-05-20 23:06:07 +00:00
2025-06-03 02:12:58 +00:00
2025-06-05 18:10:22 -07:00
2025-05-20 23:06:07 +00:00
2025-05-20 23:06:07 +00:00
2025-06-04 14:07:01 +00:00
2025-06-05 19:42:52 +00:00
2025-05-29 21:41:15 +00:00
2025-05-30 08:29:52 +00:00
2025-05-20 23:06:07 +00:00
2025-04-29 21:58:45 -03:00
2025-05-30 08:10:12 -03:00
2025-05-22 14:22:35 -04:00
2025-06-05 20:24:56 +00:00
2025-06-05 23:35:43 +00:00
2025-06-06 06:23:09 +00:00
2025-06-04 14:07:01 +00:00
2025-05-26 11:46:35 +00:00
2025-06-03 15:59:46 +00:00
2025-05-26 23:04:31 -04:00
2025-05-26 23:04:31 -04:00
2025-04-02 13:26:34 -07:00
2025-06-02 21:24:08 +00:00
2025-05-29 12:55:47 +00:00
2025-06-05 19:42:52 +00:00
2025-06-05 19:42:52 +00:00
2025-06-05 03:53:59 +05:30
2025-05-26 23:04:31 -04:00
2025-05-20 23:06:07 +00:00
2025-06-05 19:42:52 +00:00
2025-06-05 07:09:09 +00:00
2025-05-26 17:43:57 +00:00
2025-05-23 14:53:53 +00:00
2025-05-27 16:56:27 +00:00
2025-06-04 19:54:24 +02:00
2025-06-02 16:29:06 +00:00
2025-05-20 23:06:07 +00:00
2025-04-02 13:26:34 -07:00
2025-05-26 11:48:50 -04:00
2025-05-26 11:48:50 -04:00
2025-06-03 14:59:17 -03:00
2025-04-02 13:26:34 -07:00
2025-05-26 23:04:31 -04:00
2025-05-29 20:43:12 +00:00
2025-05-20 23:06:07 +00:00
2025-04-25 17:41:49 +03:00
2025-06-03 12:23:01 -04:00
2025-06-04 17:29:08 +00:00
2025-05-20 23:06:07 +00:00
2025-05-26 23:04:31 -04:00
2025-05-26 13:44:09 +00:00
2025-05-20 23:06:07 +00:00
2025-04-02 13:26:34 -07:00
2025-05-16 17:35:44 +02:00
2025-05-20 23:06:07 +00:00
2025-05-01 17:37:43 +02:00
2025-05-26 11:48:50 -04:00
2025-04-02 13:26:34 -07:00
2025-05-23 20:45:32 +00:00
2025-05-29 16:09:07 +00:00
2025-05-30 14:32:59 +02:00
2025-06-05 13:25:51 -04:00
2025-04-02 13:26:34 -07:00
2025-04-21 21:30:21 -07:00
2025-06-02 21:12:28 -06:00
2025-06-03 17:43:06 -04:00
2025-06-04 02:37:27 +00:00
2025-05-26 18:23:41 +00:00
2025-04-02 13:26:34 -07:00
2025-05-26 18:23:41 +00:00
2025-06-04 17:29:08 +00:00
2025-05-06 10:18:48 +00:00
2025-06-05 07:09:09 +00:00
2025-06-02 16:29:06 +00:00
2025-06-06 06:24:59 +00:00
2025-05-14 23:29:11 +02:00
2025-05-23 19:31:25 +00:00
2025-05-30 15:26:27 +00:00
2025-06-04 02:37:27 +00:00
2025-05-01 19:24:14 +00:00
2025-06-05 18:10:22 -07:00
2025-04-23 20:54:09 +00:00
2025-04-23 15:30:20 +00:00
2025-05-20 23:06:07 +00:00
2025-05-29 15:20:58 -04:00
2025-06-06 06:23:09 +00:00
2025-06-03 22:30:59 +00:00
2025-06-05 19:38:19 +08:00
2025-06-06 06:23:09 +00:00
2025-05-26 11:48:50 -04:00
2025-06-02 13:22:32 +00:00
2025-04-23 20:54:09 +00:00