Skip to content

Commit

Permalink
fixes a semantic error while loading repositories (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
isacikgoz authored Dec 28, 2018
1 parent 51ee48c commit b752600
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var (
)

func main() {
kingpin.Version("gitbatch version 0.2.0")
kingpin.Version("gitbatch version 0.2.1")
// parse the command line flag and options
kingpin.Parse()

Expand Down
20 changes: 10 additions & 10 deletions pkg/gui/gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ func (gui *Gui) Run() error {
return err
}

defer g.Close()
gui.g = g
g.Highlight = true
g.SelFgColor = gocui.ColorGreen

// If InputEsc is true, when ESC sequence is in the buffer and it doesn't
// match any known sequence, ESC means KeyEsc.
g.InputEsc = true
g.SetManagerFunc(gui.layout)

// start an async view apart from this loop to show loading screen
go func(g_ui *Gui) {
maxX, maxY := g.Size()
Expand Down Expand Up @@ -131,16 +141,6 @@ func (gui *Gui) Run() error {
gui.fillMain(g)
}(gui)

defer g.Close()
gui.g = g
g.Highlight = true
g.SelFgColor = gocui.ColorGreen

// If InputEsc is true, when ESC sequence is in the buffer and it doesn't
// match any known sequence, ESC means KeyEsc.
g.InputEsc = true
g.SetManagerFunc(gui.layout)

if err := gui.generateKeybindings(); err != nil {
log.Error("Keybindings could not be created.")
return err
Expand Down

0 comments on commit b752600

Please sign in to comment.