summaryrefslogtreecommitdiff
path: root/tui.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-02-20 20:11:52 +0300
committerGrail Finder <wohilas@gmail.com>2026-02-20 20:11:52 +0300
commit61a0ddfdfd266fa533abf6d3bb8f000f1214a2cd (patch)
treea5270491560b209d15afc46c1f01c3dc485857e5 /tui.go
parent26ab5c59e31f18b3b8bd7b34fed751a3de179056 (diff)
Fix: stop making http request per each keypress
Diffstat (limited to 'tui.go')
-rw-r--r--tui.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/tui.go b/tui.go
index 2c4fe67..b45f3e8 100644
--- a/tui.go
+++ b/tui.go
@@ -177,6 +177,9 @@ Press <Enter> or 'x' to return
)
func init() {
+ // Start background goroutine to update model color cache
+ startModelColorUpdater()
+
tview.Styles = colorschemes["default"]
app = tview.NewApplication()
pages = tview.NewPages()
@@ -749,6 +752,8 @@ func init() {
}
if event.Key() == tcell.KeyF12 {
// help window cheatsheet
+ // Update help text with current status before showing
+ helpView.SetText(fmt.Sprintf(helpText, makeStatusLine()))
pages.AddPage(helpPage, helpView, true, true)
return nil
}