@@ -60,6 +60,9 @@ type permissionDialogCmp struct {
6060 cachedContent string
6161 contentDirty bool
6262
63+ positionRow int // Row position for dialog
64+ positionCol int // Column position for dialog
65+
6366 keyMap KeyMap
6467}
6568
@@ -446,6 +449,9 @@ func (p *permissionDialogCmp) render() string {
446449 p.contentViewPort.SetHeight(contentHeight)
447450 p.contentViewPort.SetContent(contentFinal)
448451
452+ p.positionRow = p.wHeight / 2
453+ p.positionRow -= (contentHeight + 9) / 2
454+
449455 var contentHelp string
450456 if p.supportsDiffView() {
451457 contentHelp = help.New().View(p.keyMap)
@@ -509,7 +515,10 @@ func (p *permissionDialogCmp) SetSize() tea.Cmd {
509515 if oldWidth != p.width || oldHeight != p.height {
510516 p.contentDirty = true
511517 }
512−
518+ p.positionRow = p.wHeight / 2
519+ p.positionRow -= p.height / 2
520+ p.positionCol = p.wWidth / 2
521+ p.positionCol -= p.width / 2
513522 return nil
514523}
515524
@@ -529,9 +538,5 @@ func (p *permissionDialogCmp) ID() dialogs.DialogID {
529538
530539// Position implements PermissionDialogCmp.
531540func (p *permissionDialogCmp) Position() (int, int) {
532− row := (p.wHeight / 2) - 2 // Just a bit above the center
533− row -= p.height / 2
534− col := p.wWidth / 2
535− col -= p.width / 2
536− return row, col
541+ return p.positionRow, p.positionCol
537542}