Skip to content

Commit

Permalink
Fix bug where overflow if viewport height matches terminal height exa…
Browse files Browse the repository at this point in the history
…ctly
  • Loading branch information
robinovitch61 committed Jul 1, 2022
1 parent e323857 commit 634dc4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/tui/components/viewport/viewport.go
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ func (m Model) getFooter() (string, int) {
denominator = totalNumLines
}

if totalNumLines > m.height-len(m.getHeader()) {
if totalNumLines >= m.height-len(m.getHeader()) {
percentScrolled := percent(numerator, denominator)
footerString := fmt.Sprintf("%d%% (%d/%d)", percentScrolled, numerator, denominator)
renderedFooterString := m.FooterStyle.Copy().MaxWidth(m.width).Render(footerString)
Expand Down

0 comments on commit 634dc4d

Please sign in to comment.