history

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HistTracker

type HistTracker interface {
	TrackState(context.Context, input.Binder, text.State)
}

type History

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

func New

func New() *History

func (*History) Name

func (h *History) Name(context.Context) string

func (*History) Redo

func (*History) Run

func (h *History) Run(ctx context.Context, b input.Binder) error

func (*History) TrackState

func (h *History) TrackState(ctx context.Context, b input.Binder, state text.State)

func (*History) Type

func (h *History) Type(input.Operation)

func (*History) Undo

type OnEdit

type OnEdit struct{}

func NewOnEdit

func NewOnEdit() *OnEdit

func (OnEdit) FileOpened

func (e OnEdit) FileOpened(ctx context.Context, b input.Binder)

func (OnEdit) Name

func (e OnEdit) Name(context.Context) string

func (OnEdit) OpNames

func (e OnEdit) OpNames(context.Context) []string

func (OnEdit) TextJustChanged

func (e OnEdit) TextJustChanged(ctx context.Context, b input.Binder, _ ...struct {
	Before text.State
	Edit   input.Edit
})

func (OnEdit) Type

func (e OnEdit) Type(input.Hook)

func (OnEdit) Valid

func (e OnEdit) Valid(_ context.Context, b input.Binder) error

type Redo

type Redo struct{}

func NewRedo

func NewRedo() *Redo

func (Redo) DefaultEvent

func (Redo) DefaultEvent() string

func (Redo) Menu

func (Redo) Menu(context.Context) string

func (Redo) Name

func (Redo) Name(context.Context) string

func (Redo) Op

func (Redo) Type

func (Redo) Type(input.Command)

type Redoer

type Redoer interface {
	Redo(context.Context) input.Operation
}

type Restorer

type Restorer interface {
	Restore(text.State) input.Operation
}

type Stater

type Stater interface {
	State(context.Context) text.State
}

type Undo

type Undo struct{}

func NewUndo

func NewUndo() *Undo

func (Undo) DefaultEvent

func (Undo) DefaultEvent() string

func (Undo) Menu

func (Undo) Menu(context.Context) string

func (Undo) Name

func (Undo) Name(context.Context) string

func (Undo) Op

func (Undo) Type

func (Undo) Type(input.Command)

type Undoer

type Undoer interface {
	Undo(context.Context) input.Operation
}

Jump to

Keyboard shortcuts

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