summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkg/gui/gui.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index 607c6f8..0c050bd 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -111,6 +111,16 @@ func (gui *Gui) Run() error {
g.InputEsc = true
g.SetManagerFunc(gui.layout)
+ 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()