diff options
Diffstat (limited to 'help.go')
| -rw-r--r-- | help.go | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -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() |
