Skip to content

Commit 5cc0fef

Browse files
Fix incorrect viewport height calculation when not using widgets
1 parent 7696463 commit 5cc0fef

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
@@ -461,12 +461,9 @@ func (s *Skeleton) View() string {
461461

462462
// Calculate available height for body
463463
headerHeight := lipgloss.Height(s.header.View())
464-
widgetHeight := 0
465-
if len(s.widget.widgets) > 0 {
466-
widgetHeight = lipgloss.Height(s.widget.View())
467-
}
464+
footerHeight := lipgloss.Height(s.widget.View())
468465

469-
bodyHeight := s.viewport.Height - headerHeight - widgetHeight
466+
bodyHeight := s.viewport.Height - headerHeight - footerHeight
470467

471468
// Style for the body content
472469
base := lipgloss.NewStyle().

0 commit comments

Comments
 (0)