62b97cbbbc1a98d079d77fccf7808772c8f84df0

Author
Christian Rocha <christian@rocha.is>
Committer
Christian Rocha <christian@rocha.is>
Date

Message

Correct repo viewport height

Diff

 1diff --git a/tui/commands.go b/tui/commands.go
 2index a02fc8a1474951108d0fd1fd62f3056385d50a46..173e1d89d2f47d0b6f0d6b8aea23291c703c6926 100644
 3--- a/tui/commands.go
 4+++ b/tui/commands.go
 5@@ -50,7 +50,10 @@ func (b *Bubble) setupCmd() tea.Msg {
 6 		}
 7 		width := b.width
 8 		boxLeftWidth := menuStyle.GetWidth() + menuStyle.GetHorizontalFrameSize()
 9-		const heightMargin = 12 // TODO: figure out why this needs to be 12
10+		// TODO: also send this along with a tea.WindowSizeMsg
11+		var heightMargin = lipgloss.Height(b.headerView()) +
12+			lipgloss.Height(b.footerView()) +
13+			contentBoxStyle.GetVerticalFrameSize()
14 		rb := repo.NewBubble(b.repoSource, me.Repo, width, boxLeftWidth, b.height, heightMargin, tmplConfig)
15 		initCmd := rb.Init()
16 		msg := initCmd()