aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmnikar2021-11-04 00:50:38 +0000
committerGitHub2021-11-04 00:50:38 +0000
commite39cfa40dfc320559c5efdb502e1149c4564cb62 (patch)
tree8afbae5a06f2735aa209a44040349d6e540be811
parent253bd6b3a847433c181b7b49ec77e7a8aab209c3 (diff)
Hide keys bound to `no_op` from infobox (#971)
-rw-r--r--helix-term/src/keymap.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs
index 72d0a733..93f64fa4 100644
--- a/helix-term/src/keymap.rs
+++ b/helix-term/src/keymap.rs
@@ -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) {