From 7a7b9df7632cd18adc7dff544a677060bba67a27 Mon Sep 17 00:00:00 2001 From: kt programs Date: Tue, 12 Apr 2022 17:49:31 +0800 Subject: [PATCH] review: show command that will be executed by binding Also show commands that don't have a binding. This allows users to see what's available to bind. Signed-off-by: kt programs Acked-by: Robin Jarry --- widgets/compose.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/widgets/compose.go b/widgets/compose.go index 64eb285..5f2c706 100644 --- a/widgets/compose.go +++ b/widgets/compose.go @@ -960,10 +960,8 @@ func newReviewMessage(composer *Composer, err error) *reviewMessage { for _, input := range bindings.GetReverseBindings(strokes) { inputs = append(inputs, config.FormatKeyStrokes(input)) } - if len(inputs) == 0 { - continue - } - actions = append(actions, fmt.Sprintf(" %-6s %s", strings.Join(inputs[:], ", "), name)) + actions = append(actions, fmt.Sprintf(" %-6s %-40s %s", + strings.Join(inputs[:], ", "), name, cmd)) } spec := []ui.GridSpec{