Help screen: wrap descriptions under themselves, size to the terminal

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 23:40:25 +02:00
co-authored by Claude Sonnet 5.5
parent 394e78ec6a
commit 79b440f6f7
3 changed files with 192 additions and 73 deletions
+6 -1
View File
@@ -391,6 +391,11 @@ func (a *App) pushOverlay(p, focus tview.Primitive, hints string, full bool, onC
// openModal shows p centered above the current view.
func (a *App) openModal(p tview.Primitive, width, height int) {
a.openModalHints(p, width, height, "↑↓ move · ←→ change · Enter select · Esc cancel")
}
// openModalHints is openModal with its own status bar hints.
func (a *App) openModalHints(p tview.Primitive, width, height int, hints string) {
box := tview.NewFlex().
AddItem(nil, 0, 1, false).
AddItem(tview.NewFlex().SetDirection(tview.FlexRow).
@@ -398,7 +403,7 @@ func (a *App) openModal(p tview.Primitive, width, height int) {
AddItem(p, height, 0, true).
AddItem(nil, 0, 1, false), width, 0, true).
AddItem(nil, 0, 1, false)
a.pushOverlay(box, p, "↑↓ move · ←→ change · Enter select · Esc cancel", false, nil)
a.pushOverlay(box, p, hints, false, nil)
}
// openSidePanel shows p at the top right so most of the view behind it stays