mirror of https://github.com/helix-editor/helix
Hide keys bound to `no_op` from infobox (#971)
parent
253bd6b3a8
commit
e39cfa40df
|
@ -140,7 +140,12 @@ impl KeyTrieNode {
|
||||||
let mut body: Vec<(&str, BTreeSet<KeyEvent>)> = Vec::with_capacity(self.len());
|
let mut body: Vec<(&str, BTreeSet<KeyEvent>)> = Vec::with_capacity(self.len());
|
||||||
for (&key, trie) in self.iter() {
|
for (&key, trie) in self.iter() {
|
||||||
let desc = match trie {
|
let desc = match trie {
|
||||||
KeyTrie::Leaf(cmd) => cmd.doc(),
|
KeyTrie::Leaf(cmd) => {
|
||||||
|
if cmd.name() == "no_op" {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
cmd.doc()
|
||||||
|
}
|
||||||
KeyTrie::Node(n) => n.name(),
|
KeyTrie::Node(n) => n.name(),
|
||||||
};
|
};
|
||||||
match body.iter().position(|(d, _)| d == &desc) {
|
match body.iter().position(|(d, _)| d == &desc) {
|
||||||
|
|
Loading…
Reference in New Issue