diff options
| author | Jeff Carr <[email protected]> | 2025-02-01 19:00:15 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-01 19:00:15 -0600 |
| commit | e3c874cd695626ff84a439c442cb6f681f5d8486 (patch) | |
| tree | dabee60ee0737f5b386b880cecb3b84f21b304fa /help.go | |
| parent | eccec3ef1a193d4a567399c28b3fdaadc933f624 (diff) | |
help view opens on startup (kinda)
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() |
