cleanup: if instead of switch-case with single case

pull/45/head
Jussi Tiira 3 years ago
parent e4788bace8
commit 261f50d7ea

@ -67,8 +67,7 @@ func (v *Views) Layout(g *gocui.Gui, maxX, maxY int) error {
current := g.CurrentView()
if current != nil {
switch current.Name() {
case v.Menu.Name():
if current.Name() == v.Menu.Name() {
err = v.Menu.Set(g, 0, 6, 10, maxY)
if err != nil {
return err

Loading…
Cancel
Save