buf

package
v1.0.0-rc.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: AGPL-3.0, AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package buf owns the read-only terminal screen buffer contract for tests.

Boundary law:

  • immutable observation surface only
  • no timing/retry policy
  • no fixture IO
  • no runtime-driver concerns (pty, vt, retained loop)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MatrixView

type MatrixView struct {
	// contains filtered or unexported fields
}

Matrix is a concrete read-only screen view.

func FromString

func FromString(raw string) MatrixView

FromString builds a screen view from raw terminal text.

func FromStringWithViewport

func FromStringWithViewport(raw string, cols, rows int) MatrixView

FromStringWithViewport builds a screen view using fixed viewport bounds.

func (MatrixView) Cell

func (m MatrixView) Cell(x, y int) rune

func (MatrixView) Line

func (m MatrixView) Line(y int) string

func (MatrixView) Size

func (m MatrixView) Size() (cols, rows int)

func (MatrixView) String

func (m MatrixView) String() string

type View

type View interface {
	Size() (cols, rows int)
	Cell(x, y int) rune
	Line(y int) string
	String() string
}

View is an immutable read-only terminal screen surface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL