diff options
author | gibbz00 | 2023-06-03 08:37:06 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2023-06-07 01:11:13 +0000 |
commit | 3d0bc720994a404ba316562621dd186e3efe98c5 (patch) | |
tree | ec26b12d749d7b658e509e3332f878b212f36307 /helix-term/src | |
parent | 19326d23d15f5e7a1df61249d071e835a28905ed (diff) |
Place `Info::from_keymap()` contents in `keymap.infobox()`:
This makes it easier later control the order in which the key events
are presented.
Diffstat (limited to 'helix-term/src')
-rw-r--r-- | helix-term/src/keymap.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs index b9e0ec1d..973786d5 100644 --- a/helix-term/src/keymap.rs +++ b/helix-term/src/keymap.rs @@ -102,7 +102,15 @@ impl KeyTrieNode { .position(|&k| k == *keys.iter().next().unwrap()) .unwrap() }); - Info::from_keymap(self.name(), body) + + let body: Vec<_> = body + .into_iter() + .map(|(events, desc)| { + let events = events.iter().map(ToString::to_string).collect::<Vec<_>>(); + (events.join(", "), desc) + }) + .collect(); + Info::new(self.name(), &body) } } |