diff --git a/help/help.go b/help/help.go index 6db06491..90971ac4 100644 --- a/help/help.go +++ b/help/help.go @@ -164,11 +164,10 @@ func (m Model) FullHelpView(groups [][]key.Binding) string { return "" } + // Linter note: at this time we don't think it's worth the additional + // code complexity involved in preallocating this slice. + //nolint:prealloc var ( - // Linter note: at this time we don't think it's worth the additional - // code complexity involved in preallocating this slice. - // - //nolint:prealloc out []string totalWidth int diff --git a/viewport/keymap.go b/viewport/keymap.go index f410f480..9289706a 100644 --- a/viewport/keymap.go +++ b/viewport/keymap.go @@ -22,21 +22,27 @@ func DefaultKeyMap() KeyMap { return KeyMap{ PageDown: key.NewBinding( key.WithKeys("pgdown", spacebar, "f"), + key.WithHelp("f/pgdn", "page down"), ), PageUp: key.NewBinding( key.WithKeys("pgup", "b"), + key.WithHelp("b/pgup", "page up"), ), HalfPageUp: key.NewBinding( key.WithKeys("u", "ctrl+u"), + key.WithHelp("u", "½ page up"), ), HalfPageDown: key.NewBinding( key.WithKeys("d", "ctrl+d"), + key.WithHelp("d", "½ page down"), ), Up: key.NewBinding( key.WithKeys("up", "k"), + key.WithHelp("↑/k", "up"), ), Down: key.NewBinding( key.WithKeys("down", "j"), + key.WithHelp("↓/j", "down"), ), } }