mirror of https://github.com/helix-editor/helix
Exclude config no_op bindings in command palette.
parent
39773e48d3
commit
3a0892f793
|
@ -255,15 +255,12 @@ impl Keymap {
|
||||||
// recursively visit all nodes in keymap
|
// recursively visit all nodes in keymap
|
||||||
fn map_node(cmd_map: &mut ReverseKeymap, node: &KeyTrie, keys: &mut Vec<KeyEvent>) {
|
fn map_node(cmd_map: &mut ReverseKeymap, node: &KeyTrie, keys: &mut Vec<KeyEvent>) {
|
||||||
match node {
|
match node {
|
||||||
KeyTrie::MappableCommand(cmd) => match cmd {
|
KeyTrie::MappableCommand(cmd) => {
|
||||||
MappableCommand::Typable { name, .. } => {
|
let name = cmd.name();
|
||||||
|
if name != "no_op" {
|
||||||
cmd_map.entry(name.into()).or_default().push(keys.clone())
|
cmd_map.entry(name.into()).or_default().push(keys.clone())
|
||||||
}
|
}
|
||||||
MappableCommand::Static { name, .. } => cmd_map
|
}
|
||||||
.entry(name.to_string())
|
|
||||||
.or_default()
|
|
||||||
.push(keys.clone()),
|
|
||||||
},
|
|
||||||
KeyTrie::Node(next) => {
|
KeyTrie::Node(next) => {
|
||||||
for (key, trie) in &next.map {
|
for (key, trie) in &next.map {
|
||||||
keys.push(*key);
|
keys.push(*key);
|
||||||
|
|
Loading…
Reference in New Issue