From e39cfa40dfc320559c5efdb502e1149c4564cb62 Mon Sep 17 00:00:00 2001 From: Omnikar Date: Wed, 3 Nov 2021 20:50:38 -0400 Subject: Hide keys bound to `no_op` from infobox (#971) --- helix-term/src/keymap.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'helix-term/src') 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)> = 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) { -- cgit v1.2.3-70-g09d2