summaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/tui_help.rs
diff options
context:
space:
mode:
authorJeff Zhao <jeff.no.zhao@gmail.com>2023-08-29 10:16:53 -0400
committerJeff Zhao <jeff.no.zhao@gmail.com>2023-08-29 10:16:53 -0400
commit31beaabe6b2cf4119aacae6c1722cdc1e5ba2f5b (patch)
tree095ec193999ac9ad3494a2abf039ff1dc7da00d2 /src/ui/widgets/tui_help.rs
parent40ab1b0125c86b6554f2a23d90053c805d7a857a (diff)
command chaining support
- breaks existing keymap configs -`command` field is renamed to `commands` - now an array instead of a single string
Diffstat (limited to 'src/ui/widgets/tui_help.rs')
-rw-r--r--src/ui/widgets/tui_help.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ui/widgets/tui_help.rs b/src/ui/widgets/tui_help.rs
index 84f0c3d..7e5f5f2 100644
--- a/src/ui/widgets/tui_help.rs
+++ b/src/ui/widgets/tui_help.rs
@@ -125,13 +125,13 @@ pub fn get_raw_keymap_table<'a>(
let key = key_event_to_string(event);
let (command, comment) = match bind {
CommandKeybind::SimpleKeybind {
- command,
- description: None,
- } => (format!("{}", command), command.comment()),
- CommandKeybind::SimpleKeybind {
- command,
+ commands,
description: Some(desc),
- } => (format!("{}", command), desc.as_str()),
+ } => (format!("{}", commands[0]), desc.as_str()),
+ CommandKeybind::SimpleKeybind {
+ commands,
+ description: None,
+ } => (format!("{}", commands[0]), commands[0].comment()),
CommandKeybind::CompositeKeybind(sub_keymap) => {
let mut sub_rows = get_raw_keymap_table(sub_keymap, "", sort_by);
for _ in 0..sub_rows.len() {