allow switching panes

This commit is contained in:
2023-03-03 23:44:08 -08:00
parent 10bd84e984
commit 5ce5ff29ea

View File

@@ -53,6 +53,15 @@ var settingsKey = key.NewBinding(
) )
func (m Settings) Update(msg tea.Msg) (tea.Model, tea.Cmd) { 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 { if msg, ok := msg.(tea.WindowSizeMsg); ok {
m.AuthorList.SetHeight(msg.Height - 8) m.AuthorList.SetHeight(msg.Height - 8)
m.RepoList.SetHeight(msg.Height - 8) m.RepoList.SetHeight(msg.Height - 8)