mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 09:26:19 +04: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:
parent
d20c1632a7
commit
39773e48d3
@ -102,13 +102,6 @@ pub fn infobox(&self) -> Info {
|
||||
.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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user