summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorİbrahim Serdar Açıkgöz <serdaracikgoz86@gmail.com>2018-12-28 10:59:28 +0300
committerİbrahim Serdar Açıkgöz <serdaracikgoz86@gmail.com>2018-12-28 10:59:28 +0300
commit44ddb04e0bfe395565ace08e34d1d84332c48bc1 (patch)
treec830da1154525d87cd009c32797ca40bdb15153a
parentHotfix 40 (#45) (diff)
downloadgitbatch-44ddb04e0bfe395565ace08e34d1d84332c48bc1.tar.gz
fixes a semantic error while loading repositories
-rw-r--r--main.go2
-rw-r--r--pkg/gui/gui.go20
2 files changed, 11 insertions, 11 deletions
diff --git a/main.go b/main.go
index 8edebeb..7ef48b8 100644
--- a/main.go
+++ b/main.go
@@ -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()
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index 2e1f2b2..c839860 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -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()
@@ -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