Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

keymap_ui: Only show conflicts between user bindings (#34284)

Ben Kunkle3b9bb521f4a4
diff --git a/crates/settings_ui/src/keybindings.rs b/crates/settings_ui/src/keybindings.rs
index 56be9481e5b..c3d6ae7c301 100644
--- a/crates/settings_ui/src/keybindings.rs
+++ b/crates/settings_ui/src/keybindings.rs
@@ -193,7 +193,13 @@ impl ConflictState {
key_bindings
.iter()
.enumerate()
- .filter(|(_, binding)| !binding.keystroke_text.is_empty())
+ .filter(|(_, binding)| {
+ !binding.keystroke_text.is_empty()
+ && binding
+ .source
+ .as_ref()
+ .is_some_and(|source| matches!(source.0, KeybindSource::User))
+ })
.for_each(|(index, binding)| {
action_keybind_mapping
.entry(binding.get_action_mapping())