Skip to content

Commit 960d156

Browse files
authored
Merge pull request #29 from joelzwarrington/incorrect-viewport-height-no-widgets
Fix incorrect viewport height calculation when not using widgets
2 parents 37a6c9a + 5cc0fef commit 960d156

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

skeleton.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -482,12 +482,9 @@ func (s *Skeleton) View() string {
482482

483483
// Calculate available height for body
484484
headerHeight := lipgloss.Height(s.header.View())
485-
widgetHeight := 0
486-
if len(s.widget.widgets) > 0 {
487-
widgetHeight = lipgloss.Height(s.widget.View())
488-
}
485+
footerHeight := lipgloss.Height(s.widget.View())
489486

490-
bodyHeight := s.viewport.Height - headerHeight - widgetHeight
487+
bodyHeight := s.viewport.Height - headerHeight - footerHeight
491488

492489
// Style for the body content
493490
base := lipgloss.NewStyle().

0 commit comments

Comments
 (0)