buffer

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferSets

type BufferSets []*bufferSet

Buffers

func NewBufferSets

func NewBufferSets(paths []string) (bss *BufferSets, errs error)

Create editorleaf.Editor.Buffers from Files (command line arguments) Always one will be created

Create bufferSet and append to Buffers from path string array

From paths (command line argument) create editorleaf.Editor.Buffers Create one bufferSet, even if there is none.

func (*BufferSets) Append

func (bss *BufferSets) Append(buffSet *bufferSet)

func (*BufferSets) BufferSet

func (bss *BufferSets) BufferSet(ff *editbuffer.EditBuffer) *bufferSet

Find BufferSet in BufferSetArray

func (*BufferSets) GetFileAndMeta

func (bss *BufferSets) GetFileAndMeta(filePath string) (*editbuffer.EditBuffer, *Meta, editbuffer.Result, error)

Find the buffer and meta for filePath from Buffers Create a new buffer otherwise Load into buffer if the file exists Register into Buffers Return buffer and meta

func (*BufferSets) GetIndexByBufferFile

func (bss *BufferSets) GetIndexByBufferFile(ff *editbuffer.EditBuffer) int

Check if the specified *editbuffer.File exists in BufferSets If found, return its index If not found, return -1

func (*BufferSets) GetMeta

func (bss *BufferSets) GetMeta(ff *editbuffer.EditBuffer) *Meta

Find a buffer from the bufferSetArray If found, return the meta from metas If metas does not exist, return a new meta If there exists an Editor, you could call "func (e *Editor) GetMeta() *meta {}"

func (*BufferSets) RemoveByBufferFile

func (bss *BufferSets) RemoveByBufferFile(ff *editbuffer.EditBuffer) int

Remove bufferSet match *editbuffer.File in BufferSets. Return removed index of bufferSet in BufferSets. Return -1 if not match.

func (*BufferSets) RemoveByBufferIndex

func (bss *BufferSets) RemoveByBufferIndex(index int) int

type Meta

type Meta struct {
	RowsPos rows.RowsPos

	ScreenPos     screen.Cursor
	PrevScreenPos screen.Cursor // Horizontal position of the cursor when vertically moving the cursor

	LogicalPos     screen.Cursor
	PrevLogicalPos screen.Cursor

	ModelineCx int // Number of columns to display in the modeline

	StartDrawRowIndex     int
	StartDrawLogicalIndex int
	EndDrawRowIndex       int

	Search         *search.SearchResults
	HighlightLayer *highlight.HighlightsLayer
}

func NewMinibufferMeta

func NewMinibufferMeta() *Meta

func (*Meta) DeepCopy

func (m *Meta) DeepCopy() *Meta

Jump to

Keyboard shortcuts

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