state

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageInfo = iota
	MessageError
)

Message types

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	Mode              mode.Mode
	PrevMode          mode.Mode
	WindowStates      map[int]*WindowState
	Layout            layout.Layout
	Cmdline           []rune
	CmdlineCursor     int
	CompletionResults []string
	CompletionIndex   int
	SearchMode        rune
	Error             error
	ErrorType         int
}

State holds the state of the editor to display the user interface.

type WindowState

type WindowState struct {
	Name          string
	Modified      bool
	Width         int
	Offset        int64
	Cursor        int64
	Bytes         []byte
	Size          int
	Length        int64
	Mode          mode.Mode
	Pending       bool
	PendingByte   byte
	VisualStart   int64
	EditedIndices []int64
	FocusText     bool
}

WindowState holds the state of one window.

Jump to

Keyboard shortcuts

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