diff options
author | gibbz00 | 2023-05-29 20:01:45 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2023-06-07 01:11:13 +0000 |
commit | 19326d23d15f5e7a1df61249d071e835a28905ed (patch) | |
tree | eacc028aaaef39b77aaa2e6d91788f3eaa55d230 /helix-view | |
parent | 3a0892f793a0dbf1f99f5b7e6fb23cdff68fb519 (diff) |
Keymap infobox: Idiomatic body tuple.
Does not change any behavior other than making the tuple slightly
more idiomatic. Keymap infobox shows key events, then the respective
description. This commit makes sure that order is used from the get go,
rather than flipping it midway.
Diffstat (limited to 'helix-view')
-rw-r--r-- | helix-view/src/info.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-view/src/info.rs b/helix-view/src/info.rs index 3080cf8e..eced78e1 100644 --- a/helix-view/src/info.rs +++ b/helix-view/src/info.rs @@ -55,10 +55,10 @@ impl Info { } } - pub fn from_keymap(title: &str, body: Vec<(&str, BTreeSet<KeyEvent>)>) -> Self { + pub fn from_keymap(title: &str, body: Vec<(BTreeSet<KeyEvent>, &str)>) -> Self { let body: Vec<_> = body .into_iter() - .map(|(desc, events)| { + .map(|(events, desc)| { let events = events.iter().map(ToString::to_string).collect::<Vec<_>>(); (events.join(", "), desc) }) |