summaryrefslogtreecommitdiff
path: root/help.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-01 19:00:15 -0600
committerJeff Carr <[email protected]>2025-02-01 19:00:15 -0600
commite3c874cd695626ff84a439c442cb6f681f5d8486 (patch)
treedabee60ee0737f5b386b880cecb3b84f21b304fa /help.go
parenteccec3ef1a193d4a567399c28b3fdaadc933f624 (diff)
help view opens on startup (kinda)
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()