Versions in this module Expand all Collapse all v0 v0.4.5 Nov 2, 2026 v0.4.4 Oct 28, 2026 Changes in this version type Option + func WithScrollbackOutput(w io.Writer) Option type Terminal + func (t *Terminal) AppendRowANSI(dst []byte, y int) []byte + func (t *Terminal) WriteScrollback(w io.Writer) error v0.4.3 Oct 28, 2026 v0.4.2 Oct 28, 2026 v0.4.1 Oct 28, 2026 v0.4.0 Oct 28, 2026 Changes in this version + type AltScreenModes uint8 + const AltScreenMode1047 + const AltScreenMode1049 + const AltScreenMode47 type Modes + AllowColumnSwitching bool + AltScreenModes AltScreenModes + Columns132 bool + MouseEncodingModes MouseEncodingModes + MouseTrackingModes MouseTrackingModes + SmoothScrolling bool type MouseEncoding + const MouseEncodingSGRPixels + type MouseEncodingModes uint8 + const MouseEncodingModeSGR + const MouseEncodingModeSGRPixels + const MouseEncodingModeURXVT + const MouseEncodingModeUTF8 + type MouseTrackingModes uint8 + const MouseTrackingAnyEvent + const MouseTrackingButtonEvent + const MouseTrackingNormal + const MouseTrackingX10 + type PromptKind uint8 + const PromptContinuation + const PromptNone + const PromptPrimary type Style + UnderlineColor Color type Terminal + func (t *Terminal) Prompt(y int) PromptKind v0.3.0 Oct 27, 2026 Changes in this version + var ErrSnapshotLimit = errors.New("terminal snapshot exceeds limit") + var ErrSnapshotMalformed = errors.New("malformed terminal snapshot") + var ErrSnapshotVersion = errors.New("unsupported terminal snapshot version") + func CodepointWidth(r rune) int type Modes + GraphemeClustering bool + type SnapshotLimits struct + MaxBytes int + MaxCells int type Terminal + func (t *Terminal) AppendSnapshot(dst []byte) []byte + func (t *Terminal) RestoreSnapshot(data []byte, limits SnapshotLimits) error + func (t *Terminal) Snapshot() []byte v0.2.0 Oct 27, 2026 Changes in this version type Terminal + func (t *Terminal) Compact() v0.1.0 Oct 22, 2026 Changes in this version + const DefaultScrollbackBytes + const DefaultScrollbackLines + type Attr uint16 + const AttrBlink + const AttrBold + const AttrFaint + const AttrHidden + const AttrInverse + const AttrItalic + const AttrOverline + const AttrProtected + const AttrStrikethrough + type Cell struct + Combining string + Link Hyperlink + Rune rune + Style Style + Width int + func (c Cell) AppendText(b []byte) []byte + func (c Cell) Text() string + type Color uint32 + const DefaultColor + func IndexedColor(n uint8) Color + func RGBColor(r, g, b uint8) Color + func (c Color) Index() uint8 + func (c Color) Kind() ColorKind + func (c Color) RGB() RGB + type ColorKind uint8 + const ColorDefault + const ColorIndexed + const ColorRGB + type Cursor struct + Blink bool + PendingWrap bool + Shape CursorShape + Visible bool + X int + Y int + type CursorShape uint8 + const CursorBar + const CursorBlock + const CursorDefault + const CursorUnderline + type Hyperlink struct + ID string + URI string + type Modes struct + AltScreen bool + ApplicationCursorKeys bool + ApplicationKeypad bool + Autowrap bool + BracketedPaste bool + FocusEvents bool + Insert bool + KittyKeyboard uint16 + Mouse MouseMode + MouseEncoding MouseEncoding + Newline bool + Origin bool + ReverseVideo bool + SyncUpdate bool + type MouseEncoding uint16 + const MouseEncodingDefault + const MouseEncodingSGR + const MouseEncodingURXVT + const MouseEncodingUTF8 + type MouseMode uint16 + const MouseAnyEvent + const MouseButtonEvent + const MouseNone + const MouseNormal + const MouseX10 + type Option func(*config) + func WithBell(fn func()) Option + func WithPalette(p Palette) Option + func WithReply(w io.Writer) Option + func WithScrollback(lines int) Option + func WithScrollbackBytes(n int) Option + type Palette struct + Background RGB + Colors [256]RGB + Cursor RGB + Foreground RGB + func DefaultPalette() Palette + func (p *Palette) Resolve(c Color, background bool) RGB + type RGB struct + B uint8 + G uint8 + R uint8 + type Style struct + Attrs Attr + Bg Color + Fg Color + Underline Underline + type Terminal struct + func New(cols, rows int, opts ...Option) *Terminal + func (t *Terminal) AppendRepaint(b []byte, withScrollback bool) []byte + func (t *Terminal) Cell(x, y int) Cell + func (t *Terminal) ClearDirty() + func (t *Terminal) ClearScrollback() + func (t *Terminal) Cursor() Cursor + func (t *Terminal) Dirty() bool + func (t *Terminal) Line(y int) string + func (t *Terminal) Lines() []string + func (t *Terminal) Modes() Modes + func (t *Terminal) Palette() Palette + func (t *Terminal) Repaint(withScrollback bool) []byte + func (t *Terminal) Resize(cols, rows int) + func (t *Terminal) Restart() + func (t *Terminal) RowDirty(y int) bool + func (t *Terminal) ScrollbackCells(i int) [][]Cell + func (t *Terminal) ScrollbackLen() int + func (t *Terminal) ScrollbackLine(i int) string + func (t *Terminal) ScrollbackLines() []string + func (t *Terminal) Size() (cols, rows int) + func (t *Terminal) Title() string + func (t *Terminal) Wrapped(y int) bool + func (t *Terminal) Write(p []byte) (int, error) + type Underline uint8 + const UnderlineCurly + const UnderlineDashed + const UnderlineDotted + const UnderlineDouble + const UnderlineNone + const UnderlineSingle