Documentation ¶
Index ¶
- type BufferSets
- func (bss *BufferSets) Append(buffSet *bufferSet)
- func (bss *BufferSets) BufferSet(ff *file.File) *bufferSet
- func (bss *BufferSets) GetFileAndMeta(filePath string) (*file.File, *Meta, error)
- func (bss *BufferSets) GetIndexByBufferFile(ff *file.File) int
- func (bss *BufferSets) GetMeta(ff *file.File) *Meta
- func (bss *BufferSets) RemoveByBufferFile(ff *file.File) int
- type Meta
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 te.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 te.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 *file.File) *bufferSet
Find BufferSet in BufferSetArray
func (*BufferSets) GetFileAndMeta ¶
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 *file.File) int
Check if the specified *file.File exists in BufferSets If found, return its index If not found, return -1
func (*BufferSets) GetMeta ¶
func (bss *BufferSets) GetMeta(ff *file.File) *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 *file.File) int
type Meta ¶
type Meta struct { file.Cursor Cx int Cy int PrevCx int // Horizontal position of the cursor when vertically moving the cursor PrevDrawnY int // Up to which line number was drawn PrevRowIndex int // When the logical number of lines increases PrevNumberOfLogical int // When the logical number of lines increases PrevLogicalCY int // When the logical number of lines increases ModelineCx int // Number of columns to display in the modeline Mark *mark.Mark StartDrawRowIndex int StartDrawLogicalIndex int EndDrawRowIndex int }