Don't show the paginator if there's only one page

This commit is contained in:
Christian Rocha 2020-05-15 18:44:22 -04:00 committed by Christian Muehlhaeuser
commit 198a785ac4

View file

@ -263,13 +263,18 @@ func stashView(m stashModel) string {
header = "Heres your markdown stash:"
}
var pageView string
if m.paginator.TotalPages > 1 {
pageView = paginator.View(m.paginator)
}
s += fmt.Sprintf(
"%s\n\n%s\n\n%s\n\n%s%s\n\n%s",
glowLogoView(" Glow "),
header,
stashPopulatedView(m),
blankLines,
paginator.View(m.paginator),
pageView,
helpView(m),
)
}