vline

package
v0.0.0-...-7150ffa Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vline

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

func (*Vline) Boundaries

func (v *Vline) Boundaries() *[]boundary

Return logical row boundaries information.

func (Vline) CursorPositionOnScreenLogicalLine

func (v Vline) CursorPositionOnScreenLogicalLine(colIndex int) (cx, cy int)

Returns the screen position of the cursor corresponding to the specified column index in logical rows. colIndex: column index

func (*Vline) GetBoundary

func (v *Vline) GetBoundary(rowIndex int) boundary

func (*Vline) GetCell

func (m *Vline) GetCell(index int) *cell

func (*Vline) GetHeadOfLogicalRowIndex

func (v *Vline) GetHeadOfLogicalRowIndex(colIndex int) int

Return the row and col index when it matches the head of a logical row.

func (*Vline) GetIndexOfLogicalRow

func (v *Vline) GetIndexOfLogicalRow(colIndex int) int

What index of the logical row?

func (*Vline) GetMinAndMaxIndexOfLogicalRow

func (v *Vline) GetMinAndMaxIndexOfLogicalRow(logicalRowIndex int) (int, int)

Return value is min and max column index of the logical row.

func (*Vline) IsEndOfLogicalRow

func (v *Vline) IsEndOfLogicalRow(colIndex int) bool

Determine if it is the last logical row.

func (*Vline) IsLastLogicalRow

func (v *Vline) IsLastLogicalRow(colIndex int) bool

Return value is the last logical row or not.

func (*Vline) LenLogicalRow

func (v *Vline) LenLogicalRow() int

Return logical row length

type Vlines

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

func NewVlines

func NewVlines(file *file.File) *Vlines

func (*Vlines) AllocateVlines

func (vs *Vlines) AllocateVlines(rowIndex int)

Allocate vlines based on rowIndex Set offsetIndex It should be modified so that unnecessary allocation is not performed.

func (*Vlines) Delete

func (vs *Vlines) Delete(startIndex, endIndex int)

Delete startIndex to endIndex Outside the index range is ignored

func (*Vlines) GetVline

func (vs *Vlines) GetVline(rowIndex int) *Vline

func (*Vlines) Insert

func (vs *Vlines) Insert(startIndex, endIndex int)

insert slice at position startIndex to endIndex Outside the index range is ignored

func (*Vlines) InsertN

func (vs *Vlines) InsertN(rowIndex, n int)

Insert n rows of vline at rowIndex position Outside the index range is ignored

func (*Vlines) Release

func (vs *Vlines) Release(startIndex, endIndex int)

Overwrite the specified rowIndex range of the vlines slice with nil Release(a) index a only Release(a, b) regeon a:b Release(a, -1) regeon a:

func (*Vlines) ReleaseAll

func (vs *Vlines) ReleaseAll()

func (*Vlines) Resize

func (vs *Vlines) Resize(width, height, tabWidth int)

Re-allocate vlines when resized or tab width is changed tcell calls Resize first, so need to call this at that time

func (*Vlines) SetFile

func (vs *Vlines) SetFile(file *file.File)

func (*Vlines) SetTabWidth

func (vs *Vlines) SetTabWidth(tabWidth int)

Jump to

Keyboard shortcuts

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