diff --git a/internal/ui/dialog/sessions.go b/internal/ui/dialog/sessions.go index 13306cc87945d1dafe2240c08d04a2200d7c83b9..a60e900e12e5fc8578c077f0bc63257619cccc57 100644 --- a/internal/ui/dialog/sessions.go +++ b/internal/ui/dialog/sessions.go @@ -27,6 +27,7 @@ type Session struct { Select key.Binding Next key.Binding Previous key.Binding + UpDown key.Binding Close key.Binding } } @@ -74,6 +75,10 @@ func NewSessions(com *common.Common, selectedSessionID string) (*Session, error) key.WithKeys("up", "ctrl+p"), key.WithHelp("↑", "previous item"), ) + s.keyMap.UpDown = key.NewBinding( + key.WithKeys("up", "down"), + key.WithHelp("↑↓", "choose"), + ) s.keyMap.Close = CloseKey return s, nil @@ -167,12 +172,8 @@ func (s *Session) View() string { // ShortHelp implements [help.KeyMap]. func (s *Session) ShortHelp() []key.Binding { - updown := key.NewBinding( - key.WithKeys("down", "up"), - key.WithHelp("↑↓", "choose"), - ) return []key.Binding{ - updown, + s.keyMap.UpDown, s.keyMap.Select, s.keyMap.Close, }