@@ -459,7 +459,11 @@ func (p *permissionDialogCmp) render() string {
459 contentFinal := p.getOrGenerateContent()
459 contentFinal := p.getOrGenerateContent()
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),
463 p.contentViewPort.SetHeight(contentHeight)
467 p.contentViewPort.SetHeight(contentHeight)
464 p.contentViewPort.SetContent(contentFinal)
468 p.contentViewPort.SetContent(contentFinal)