state

package
v0.0.0-...-7501b13 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Operation

type Operation int
const (
	Noop Operation = iota
	Move
	Copy
	Delete
	Go
	Insert
	InsertFile
	InsertDir
	Rename
)

func (Operation) IsInput

func (o Operation) IsInput() bool

func (Operation) Repr

func (o Operation) Repr() string

type State

type State struct {
	Tree        *t.Tree
	OpBuf       Operation
	InputBuf    []rune
	ErrBuf      string
	NodeChanges <-chan t.NodeChange
	HelpToggle  bool
}

func InitState

func InitState(root string) (*State, error)

func (*State) ProcessKey

func (s *State) ProcessKey(msg tea.KeyMsg) tea.Cmd

func (*State) ProcessNodeChange

func (s *State) ProcessNodeChange(nodeChange t.NodeChange) tea.Cmd

Jump to

Keyboard shortcuts

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