Documentation
¶
Overview ¶
Package vtest is a small terminal for tests of what internal/tui/screen writes (ADR 0033).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VT ¶
type VT struct {
X, Y int
Scrollback []string
// NoPull: made taller, it adds blank rows below what it shows (as some
// terminals do), instead of taking lines back from the scrollback.
NoPull bool
// contains filtered or unexported fields
}
VT is a small terminal for the tests: what the screen writes does to it what it does to a terminal (cursor moves, erasing, scroll regions, reverse scrolls, autowrap), with its scrollback. Cells hold one rune; a wide one (CJK) takes two, the second held by wideTail, and goes to the next row whole where only the last column is left, as terminals do. Colours are not kept (the tests write none).
func (*VT) Resize ¶
Resize makes the terminal w × h as most terminals do (tmux, iTerm2, Ghostty): the lines it shows (rows joined where they wrapped) are wrapped again at w, the cursor kept on what it was on; what no longer fits goes up into the scrollback, and taller, lines come back from it. The scroll region is the whole terminal again.