mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-09 09:49:09 +02:00
Don't show the paginator if there's only one page
This commit is contained in:
parent
d0542b6d25
commit
198a785ac4
1 changed files with 6 additions and 1 deletions
|
|
@ -263,13 +263,18 @@ func stashView(m stashModel) string {
|
|||
header = "Here’s 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),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue