@@ -445,7 +445,11 @@ func (p *permissionDialogCmp) render() string {
445 contentFinal := p.getOrGenerateContent()
445 contentFinal := p.getOrGenerateContent()
447 // Always set viewport content (the caching is handled in getOrGenerateContent)
447 // Always set viewport content (the caching is handled in getOrGenerateContent)
448+ const minContentHeight = 9
449+ contentHeight := min(
450+ max(minContentHeight, p.height-minContentHeight),
448− contentHeight := min(p.height-9, lipgloss.Height(contentFinal))
451+ lipgloss.Height(contentFinal),
449 p.contentViewPort.SetHeight(contentHeight)
453 p.contentViewPort.SetHeight(contentHeight)
450 p.contentViewPort.SetContent(contentFinal)
454 p.contentViewPort.SetContent(contentFinal)