| Class | Pry::Pager::PageTracker |
| In: |
lib/pry/pager.rb
|
| Parent: | Object |
`PageTracker` tracks output to determine whether it‘s likely to take up a whole page. This doesn‘t need to be super precise, but we can use it for `SimplePager` and to avoid invoking the system pager unnecessarily.
One simplifying assumption is that we don‘t need `page?` to return `true` on the basis of an incomplete line. Long lines should be counted as multiple lines, but we don‘t have to transition from `false` to `true` until we see a newline.