Skip to content

Commit

Permalink
Remove superfluous command description pruning for keymap infobox:
Browse files Browse the repository at this point in the history
Exist under the wrong (possibly just outdated) assumption that command
descriptions are written with their `KeyTrie` name prefixed
  • Loading branch information
gibbz00 committed May 31, 2023
1 parent 9060b9f commit 70c6565
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions helix-term/src/keymap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 70c6565

Please sign in to comment.