diff options
| 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 |
| commit | 44ddb04e0bfe395565ace08e34d1d84332c48bc1 (patch) | |
| tree | c830da1154525d87cd009c32797ca40bdb15153a /pkg/gui/gui.go | |
| parent | Hotfix 40 (#45) (diff) | |
| download | gitbatch-44ddb04e0bfe395565ace08e34d1d84332c48bc1.tar.gz | |
fixes a semantic error while loading repositories
Diffstat (limited to '')
| -rw-r--r-- | pkg/gui/gui.go | 20 |
1 files changed, 10 insertions, 10 deletions
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 |
