mirror of
https://github.com/walles/moar.git
synced 2024-09-11 20:17:13 +03:00
23 lines
307 B
Go
23 lines
307 B
Go
package m
|
|
|
|
import (
|
|
"github.com/walles/moar/twin"
|
|
)
|
|
|
|
// Page displays text in a pager.
|
|
func (p *Pager) Page() error {
|
|
screen, e := twin.NewScreen()
|
|
if e != nil {
|
|
// Screen setup failed
|
|
return e
|
|
}
|
|
|
|
p.StartPaging(screen)
|
|
screen.Close()
|
|
if p.DeInit {
|
|
return nil
|
|
}
|
|
|
|
return p.ReprintAfterExit()
|
|
}
|