1
0
mirror of https://github.com/helix-editor/helix synced 2024-11-10 10:34:45 +01:00

Remove superfluous command description pruning for keymap infobox:

Exist under the wrong (possibly just outdated) assumption that command
descriptions are written with their `KeyTrie` name prefixed
This commit is contained in:
gibbz00 2023-05-29 21:42:24 +02:00 committed by Blaž Hrastnik
parent d20c1632a7
commit 39773e48d3

@ -102,13 +102,6 @@ impl KeyTrieNode {
.position(|&k| k == *keys.iter().next().unwrap())
.unwrap()
});
let prefix = format!("{} ", self.name());
if body.iter().all(|(desc, _)| desc.starts_with(&prefix)) {
body = body
.into_iter()
.map(|(desc, keys)| (desc.strip_prefix(&prefix).unwrap(), keys))
.collect();
}
Info::from_keymap(self.name(), body)
}
}