There is no need to switch focus to playingbar as nothing happens there

This commit is contained in:
tramhao 2021-01-28 14:50:05 +08:00
parent 7f36efc206
commit 1bfefd61a6
2 changed files with 18 additions and 1 deletions

17
gomu.go
View File

@ -90,6 +90,23 @@ func (g *Gomu) cyclePanels() Panel {
return first
}
func (g *Gomu) cyclePanels2() Panel {
first :=g.panels[0]
second :=g.panels[1]
if first.HasFocus() {
g.setFocusPanel(second)
g.prevPanel = second
} else if second.HasFocus() {
g.setFocusPanel(first)
g.prevPanel = first
} else {
g.setFocusPanel(first)
g.prevPanel = first
}
return first
}
// Changes title and border color when focusing panel
// and changes color of the previous panel as well
func (g *Gomu) setFocusPanel(panel Panel) {

View File

@ -228,7 +228,7 @@ func start(application *tview.Application, args Args) {
if strings.Contains(popupName, "confirmation-") {
return e
}
gomu.cyclePanels()
gomu.cyclePanels2()
}
cmds := map[rune]string{