on main help sign in
Merge pull request #202 from charmbracelet/charm-367
84b99d5Kujtim Hoxha
internal/tui/components/dialogs/permissions/permissions.go+5−1
@@ -459,7 +459,11 @@ func (p *permissionDialogCmp) render() string {
459 contentFinal := p.getOrGenerateContent()
459 contentFinal := p.getOrGenerateContent()
460
460
461 // Always set viewport content (the caching is handled in getOrGenerateContent)
461 // Always set viewport content (the caching is handled in getOrGenerateContent)
462+ const minContentHeight = 9
463+ contentHeight := min(
464+ max(minContentHeight, p.height-minContentHeight),
462− contentHeight := min(p.height-9, lipgloss.Height(contentFinal))
465+ lipgloss.Height(contentFinal),
466+ )
463 p.contentViewPort.SetHeight(contentHeight)
467 p.contentViewPort.SetHeight(contentHeight)
464 p.contentViewPort.SetContent(contentFinal)
468 p.contentViewPort.SetContent(contentFinal)
465
469