Skip to content

Commit

Permalink
Focus on the first view
Browse files Browse the repository at this point in the history
  • Loading branch information
knqyf263 committed Mar 25, 2017
1 parent 0827ad7 commit 77af58d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dialog/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func generateView(g *gocui.Gui, desc string, fill string, coords []int, editable
view.Editable = editable

views = append(views, desc)
curView = len(views) - 1
idxView++

return nil
Expand Down Expand Up @@ -56,6 +55,9 @@ func GenerateParamsLayout(params map[string]string, command string) {

initKeybindings(g)

curView = 0
g.SetCurrentView(views[0])

if err := g.MainLoop(); err != nil && err != gocui.ErrQuit {
log.Panicln(err)
}
Expand Down

0 comments on commit 77af58d

Please sign in to comment.