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 <ktprograms@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
kt programs 2022-04-12 17:49:31 +08:00 committed by Robin Jarry
parent c6dae02925
commit 7a7b9df763
1 changed files with 2 additions and 4 deletions

View File

@ -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{