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:
+6
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user