mirror of
https://github.com/walles/moar.git
synced 2024-09-21 17:08:34 +03:00
f3dd0389e5
Page is a great function, but it is limited, because it makes too many choices for the user. The global DeInit was a good start, but really that shouldve always been a Pager field. Move DeInit inside Pager, and set default to true as before in the NewPager function. Then, users can call Page, but still have control over DeInit, as well as Line Numbers, and not have to worry about creating a Screen. Example code: r := m.NewReaderFromText("moar", strings.Repeat("moar\n", 99)) p := m.NewPager(r) p.DeInit, p.ShowLineNumbers = false, false p.Page() |
||
---|---|---|
.. | ||
ansiTokenizer_test.go | ||
ansiTokenizer.go | ||
embed-api.go | ||
matchRanges_test.go | ||
matchRanges.go | ||
pager_test.go | ||
pager.go | ||
reader_test.go | ||
reader.go |