summaryrefslogtreecommitdiff
path: root/help.go
diff options
context:
space:
mode:
Diffstat (limited to 'help.go')
-rw-r--r--help.go17
1 files changed, 15 insertions, 2 deletions
diff --git a/help.go b/help.go
index 12e8c9b..6342a5e 100644
--- a/help.go
+++ b/help.go
@@ -13,6 +13,7 @@ import (
"strings"
"github.com/awesome-gocui/gocui"
+ log "go.wit.com/log"
)
/*
@@ -41,11 +42,23 @@ var helpText []string = []string{"KEYBINDINGS",
"",
}
-func hidehelplayout() {
+func hideHelp() {
+ if me.showHelp {
+ log.Info("help is already down")
+ me.showHelp = true
+ return
+ }
+ me.showHelp = true
me.baseGui.DeleteView("help")
}
-func helplayout() error {
+func showHelp() error {
+ if !me.showHelp {
+ log.Info("help is already up")
+ me.showHelp = false
+ return nil
+ }
+ me.showHelp = false
g := me.baseGui
var err error
maxX, _ := g.Size()