@@ -16,6 +16,7 @@ import (
1616 "github.com/charmbracelet/crush/internal/tui/styles"
1717 "github.com/charmbracelet/crush/internal/tui/util"
1818 "github.com/charmbracelet/lipgloss/v2"
19+ uv "github.com/charmbracelet/ultraviolet"
1920 "github.com/charmbracelet/x/ansi"
2021)
2122
@@ -395,7 +396,22 @@ func (p *permissionDialogCmp) generateFetchContent() string {
395396 Width(p.contentViewPort.Width()).
396397 Render(renderedContent)
397398
398− return finalContent
399+ // We render the content into a buffer with the size of the viewport
400+ // width and height of the content. Then we make sure each cell has the
401+ // appropriate background color.
402+ ss := uv.NewStyledString(finalContent)
403+ scr := uv.NewScreenBuffer(p.contentViewPort.Width(), lipgloss.Height(finalContent))
404+ ss.Draw(scr, scr.Bounds())
405+ for y := 0; y < scr.Height(); y++ {
406+ for x := 0; x < scr.Width(); x++ {
407+ cell := scr.CellAt(x, y)
408+ if cell != nil {
409+ cell.Style.Bg = t.BgSubtle
410+ }
411+ }
412+ }
413+
414+ return scr.Render()
399415 }
400416 return ""
401417}
@@ -452,8 +468,8 @@ func (p *permissionDialogCmp) render() string {
452468 if p.supportsDiffView() {
453469 contentHelp = help.New().View(p.keyMap)
454470 }
455− // Calculate content height dynamically based on window size
456471
472+ // Calculate content height dynamically based on window size
457473 strs := []string{
458474 title,
459475 "",