mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-23 01:46:18 +04:00
Hide keys bound to no_op
from infobox (#971)
This commit is contained in:
parent
253bd6b3a8
commit
e39cfa40df
@ -140,7 +140,12 @@ pub fn infobox(&self) -> Info {
|
||||
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…
Reference in New Issue
Block a user