Hide keys bound to `no_op` from infobox (#971)

imgbot
Omnikar 3 years ago committed by GitHub
parent 253bd6b3a8
commit e39cfa40df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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) {

Loading…
Cancel
Save