From e3c874cd695626ff84a439c442cb6f681f5d8486 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 1 Feb 2025 19:00:15 -0600 Subject: help view opens on startup (kinda) --- help.go | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'help.go') 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() -- cgit v1.2.3