diff options
| author | Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com> | 2018-12-28 11:03:29 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-28 11:03:29 +0300 |
| commit | b7526002579436856e02173de4445e543aa77b33 (patch) | |
| tree | c830da1154525d87cd009c32797ca40bdb15153a | |
| parent | Hotfix 40 (#45) (diff) | |
| download | gitbatch-b7526002579436856e02173de4445e543aa77b33.tar.gz | |
fixes a semantic error while loading repositories (#47)
| -rw-r--r-- | main.go | 2 | ||||
| -rw-r--r-- | pkg/gui/gui.go | 20 |
2 files changed, 11 insertions, 11 deletions
@@ -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 |
