Hide keys bound to no_op from infobox (#971)

This commit is contained in:
Omnikar 2021-11-03 20:50:38 -04:00 committed by GitHub
parent 253bd6b3a8
commit e39cfa40df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -140,7 +140,12 @@ impl KeyTrieNode {
let mut body: Vec<(&str, BTreeSet<KeyEvent>)> = Vec::with_capacity(self.len());
for (&key, trie) in self.iter() {
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(),
};
match body.iter().position(|(d, _)| d == &desc) {