Skip to content

Show the quit keybind in help #721

@joelzwarrington

Description

@joelzwarrington

Description

The quit keybind isn't currently shown in the help for most fields. As an example, for the field input, these are the only keybinds which are rendered:

// KeyBinds returns the help message for the input field.
func (i *Input) KeyBinds() []key.Binding {
	if i.textinput.ShowSuggestions {
		return []key.Binding{i.keymap.AcceptSuggestion, i.keymap.Prev, i.keymap.Submit, i.keymap.Next}
	}
	return []key.Binding{i.keymap.Prev, i.keymap.Submit, i.keymap.Next}
}
if g.showHelp && len(errors) <= 0 {
  parts = append(parts, g.help.ShortHelpView(g.selector.Selected().KeyBinds()))
}

Perhaps it'd make sense to render the g.selector.Selected().KeyBinds() keybinds in addition to the g.keymap.Quit keybinds (among other group level keybinds).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions