buffer

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const TabSize = 8

Variables

This section is empty.

Functions

func RuneWidthBackJump added in v0.4.0

func RuneWidthBackJump(r rune, runes []rune, runeOffset, spacingOffset int) int

func RuneWidthJump added in v0.4.0

func RuneWidthJump(r rune, offset int) int

Types

type File added in v0.4.0

type File struct {
	First *Line

	Current *Line
	// contains filtered or unexported fields
}

func (*File) Add added in v0.4.0

func (file *File) Add(character rune) (xPosition int, addedLine bool)

func (*File) Backspace added in v0.4.0

func (file *File) Backspace() (xPosition int, deletedLine bool)

func (*File) CanSafeQuit added in v0.4.0

func (file *File) CanSafeQuit() bool

func (*File) Down added in v0.4.0

func (file *File) Down(isInsert bool) (wasPossible bool, xPosition int)

func (*File) Init added in v0.4.0

func (file *File) Init(fileName string)

func (*File) Left added in v0.4.0

func (file *File) Left() (xPosition int)

func (*File) Remove added in v0.4.0

func (file *File) Remove() (xPosition int)

func (*File) RemoveBefore added in v0.4.0

func (file *File) RemoveBefore() (xPosition int)

func (*File) RemoveLine added in v0.4.0

func (file *File) RemoveLine(isInsert bool) (xPosition int, wasFirst bool, wasLast bool)

func (*File) RemoveRestOfLine added in v0.4.0

func (file *File) RemoveRestOfLine(isInsert bool) (xPosition int)

func (*File) Right added in v0.4.0

func (file *File) Right(isInsert bool) (xPosition int)

func (*File) Save added in v0.4.0

func (file *File) Save() error

func (*File) Up added in v0.4.0

func (file *File) Up(isInsert bool) (wasPossible bool, xPosition int)

type Line added in v0.4.0

type Line struct {
	Data []rune
	Next *Line
	Prev *Line
}

func (*Line) AddAt added in v0.4.0

func (line *Line) AddAt(index int, character rune)

func (*Line) Equals added in v0.4.0

func (line *Line) Equals(str string) bool

func (*Line) Init added in v0.4.0

func (line *Line) Init(next, prev *Line)

func (*Line) RemoveAt added in v0.4.0

func (line *Line) RemoveAt(index int)

Jump to

Keyboard shortcuts

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