From 5ce5ff29eacb916fed52f8056f4b3a325e6e2e23 Mon Sep 17 00:00:00 2001 From: Tai Groot Date: Fri, 3 Mar 2023 23:44:08 -0800 Subject: [PATCH] allow switching panes --- ui/settings.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ui/settings.go b/ui/settings.go index b4b0844..6053043 100644 --- a/ui/settings.go +++ b/ui/settings.go @@ -53,6 +53,15 @@ var settingsKey = key.NewBinding( ) func (m Settings) Update(msg tea.Msg) (tea.Model, tea.Cmd) { + if msg, ok := msg.(tea.KeyMsg); ok { + if msg.String() == "tab" { + if m.cursor == authors { + m.cursor = repos + } else { + m.cursor = authors + } + } + } if msg, ok := msg.(tea.WindowSizeMsg); ok { m.AuthorList.SetHeight(msg.Height - 8) m.RepoList.SetHeight(msg.Height - 8)