Example #1
0
func nextView(g *gocui.Gui, v *gocui.View) error {
	g.Cursor = false
	v.Highlight = false
	log.Println("nextView: " + v.Name())
	var err error
	switch v.Name() {
	case "channels":
		err = g.SetCurrentView("input")
		g.Cursor = true
	case "input":
		err = g.SetCurrentView("channels")
		g.CurrentView().Highlight = true
	}
	//	g.Flush()
	return err
}