TermBuf::Region
Stability: stable — changes only in a major release.
A rectangle of the buffer that scrolls as a unit, optionally keeping the rows that scroll off it.
Scrollback capacity defaults to zero, which is the classic curses model: what scrolls away is gone. Give a region a capacity and it keeps that many rows of history, so a log pane gets scrollback without the application reimplementing it.
Constructors
Instance methods
Moves or resizes the region.
What the screen-wide region a default cursor lives in needs when the window changes size. A region an application placed itself keeps the rectangle it was given; the buffer does not move regions about.
The scrolled-off row distance rows above the live content, where one is
the most recent. nil once the request runs past what is kept.
Keeps a row that has scrolled off the top. The slice is copied, so the caller is free to overwrite it immediately.
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
How far back through the scrollback the region is being viewed: zero shows live content, one shows the most recently scrolled-off row at the top, and so on.