linebuffer

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LineBuffer

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

LineBuffer provides functionality to get sequential strings of a specified terminal width, accounting for the ansi escape codes styling the line.

func New

func New(line string, width int) LineBuffer

func (*LineBuffer) PopLeft added in v0.5.0

func (l *LineBuffer) PopLeft(continuation, toHighlight string, highlightStyle lipgloss.Style) string

PopLeft returns a string of the buffer's width from its current left offset, scrolling the left offset to the right

func (*LineBuffer) SeekToLine added in v0.5.0

func (l *LineBuffer) SeekToLine(n int)

func (*LineBuffer) SeekToWidth added in v0.5.0

func (l *LineBuffer) SeekToWidth(w int)

func (LineBuffer) TotalLines added in v0.5.0

func (l LineBuffer) TotalLines() int

func (*LineBuffer) WrappedLines added in v0.5.0

func (l *LineBuffer) WrappedLines(
	maxLinesEachEnd int,
	toHighlight string,
	toHighlightStyle lipgloss.Style,
) []string

Jump to

Keyboard shortcuts

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