cursor

package
v0.0.0-...-1b5e7ed Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DefinitionName = "cursor"

Variables

View Source
var (
	Definition = di.Def{
		Name: DefinitionName,
		Build: func(ctn di.Container) (interface{}, error) {
			return NewCursor(), nil
		},
	}
)

Functions

This section is empty.

Types

type Cursor

type Cursor interface {
	NewCursor() Cursor
	String() string
	StringFromPosition() string
	StringFromPositionOffset(offset int) string
	Flush()
	Position() int
	SetPosition(position int)
	GetRune() models.Rune
	Len() int
	Swap() int
	MoveForward() int
	MoveBackward() int
	MoveToPrevWord() int
	MoveToNextWord() int
	MoveToStart() int
	MoveToEnd() int
	DeleteToStart() int
	DeleteToEnd() int
	DeleteToPrevWord() int
	Backspace() int
	Delete() int
	WriteString(str string) (int, error)
	WriteRune(r models.Rune)
	AllWords() []string
	AllWordsFromCursor() []string
	Words() []string
	WordsFromCursor() []string
}

func NewCursor

func NewCursor() Cursor

func NewCursorFromString

func NewCursorFromString(s string) Cursor

TODO: make better

Jump to

Keyboard shortcuts

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