diff --git a/internal/tui/components/dialog/permission.go b/internal/tui/components/dialog/permission.go index ec8491898d0f666408b0ab734f027575418b04b6..085744dda0cee646b43f6f522741213c9b860960 100644 --- a/internal/tui/components/dialog/permission.go +++ b/internal/tui/components/dialog/permission.go @@ -199,12 +199,8 @@ func (p *permissionDialogCmp) render() string { // Add some padding to the content lines contentHeight := contentLines + 2 - if contentHeight < minContentHeight { - contentHeight = minContentHeight - } - if contentHeight > maxContentHeight { - contentHeight = maxContentHeight - } + contentHeight = max(contentHeight, minContentHeight) + contentHeight = min(contentHeight, maxContentHeight) p.contentViewPort.Height = contentHeight p.contentViewPort.SetContent(renderedContent)