From 62b97cbbbc1a98d079d77fccf7808772c8f84df0 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Thu, 19 Aug 2021 15:50:21 -0400 Subject: [PATCH] Correct repo viewport height --- tui/commands.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tui/commands.go b/tui/commands.go index a02fc8a14..173e1d89d 100644 --- a/tui/commands.go +++ b/tui/commands.go @@ -50,7 +50,10 @@ func (b *Bubble) setupCmd() tea.Msg { } width := b.width boxLeftWidth := menuStyle.GetWidth() + menuStyle.GetHorizontalFrameSize() - const heightMargin = 12 // TODO: figure out why this needs to be 12 + // TODO: also send this along with a tea.WindowSizeMsg + var heightMargin = lipgloss.Height(b.headerView()) + + lipgloss.Height(b.footerView()) + + contentBoxStyle.GetVerticalFrameSize() rb := repo.NewBubble(b.repoSource, me.Repo, width, boxLeftWidth, b.height, heightMargin, tmplConfig) initCmd := rb.Init() msg := initCmd()