| Did you know ... | Search Documentation: |
| Character indices |
terminal_image<-find, terminal_image<-length, terminal_image<-contents, terminal_image->selection
and terminal_image->scroll_to
address the buffer as a flat sequence of characters. Index 0 is the
first character of the oldest line still kept. A wide character counts
once, and the cell holding the right half of it not at all; a combining
mark counts on its own. Lines are separated by a single newline, except
that a wrapped line and its continuation are not separated at all --
terminal_image<-selected,
which hands text to another program, uses \r\n instead.
Indices are relative to the oldest line still kept and shift
whenever output pushes lines out of the scroll-back. One is only
good until the client writes again; terminal_block<-id
is the handle that outlives them. These methods do not see the alternate
screen: the lines an application replaced left the buffer, and while it
is up they see the scroll-back that came before it.