editor

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Editor

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

func NewEditor

func NewEditor(file *os.File, screen *screen.Screen, setCtx func(context.Context), getCtx func() context.Context, cancelCtx context.CancelFunc) *Editor

func (*Editor) BackSpace

func (e *Editor) BackSpace()

func (*Editor) CancelContext

func (e *Editor) CancelContext()

func (*Editor) Clear

func (e *Editor) Clear()

func (*Editor) InsertToBuffer

func (e *Editor) InsertToBuffer(b []byte, i int)

b: the text to be written to the buffer; i: the index to insert the text at

func (*Editor) Launch

func (e *Editor) Launch()

func (*Editor) Read

func (e *Editor) Read()

func (*Editor) ReadBufferByte

func (e *Editor) ReadBufferByte() []byte

func (*Editor) ReadBufferString

func (e *Editor) ReadBufferString() string

func (*Editor) ReadInitialBufferByte

func (e *Editor) ReadInitialBufferByte() []byte

func (*Editor) ReadInitialBufferString

func (e *Editor) ReadInitialBufferString() string

func (*Editor) Redo

func (e *Editor) Redo()

func (*Editor) RemoveFromBuffer

func (e *Editor) RemoveFromBuffer(i int)

func (*Editor) Save

func (e *Editor) Save()

func (*Editor) ScrollDown

func (e *Editor) ScrollDown()

func (*Editor) ScrollUp

func (e *Editor) ScrollUp()

func (*Editor) Undo

func (e *Editor) Undo()

func (*Editor) UpdateCursorPosition

func (e *Editor) UpdateCursorPosition()

func (*Editor) Write

func (e *Editor) Write(char rune)

type LineCounter

type LineCounter []int // Each element represents a line, and the value is the number of characters

func NewLineCounter

func NewLineCounter(v int) LineCounter

type LineNumbering

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

Jump to

Keyboard shortcuts

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