package editor

Import Path
	github.com/reeflective/readline/internal/editor (on go.dev)

Dependency Relation
	imports 16 packages, and imported by one package

Involved Source Files buffers.go editor.go editor_unix.go
Package-Level Type Names (only one)
/* sort by: | */
Buffers is a list of registers in which to put yanked/cut contents. These buffers technically are Vim registers with full functionality. Active returns the contents of the active buffer/register (or the kill buffer if no active register is active), and resets the active register. Complete returns the contents of all buffers as a structured list of completions. EditBuffer starts the system editor and opens the given buffer in it. If the filename is specified, the file will be created in the system temp directory under this name. If the filetype is not empty and if the system editor supports it, the file will be opened with the specified filetype passed to the editor. Get returns the contents of a given register. If the rune is nil (rune(0)), it returns the value of the kill buffer (the " Vim register). If the rune is an alphanumeric comprised in the valid register IDs, their content is returned. If the register name is invalid, the function returns an empty rune slice. GetKill returns the contents of the kill buffer. IsSelected returns the name of the selected register, and true if one is indeed selected, or the default one and false. Pop rotates the kill ring and returns the new top. Reset forgets any active/pending buffer/register, but does not delete its contents. SetActive sets the currently active register/buffer. Valid values are letters (lower/upper), digits (1-9), or read-only buffers ( . % : ). Write writes a slice to the currently active buffer, and/or to the kill one. After the operation, the buffers are reset, eg. none is considered active. WriteTo writes a slice directly to a target register. If the register name is invalid, nothing is written anywhere. func NewBuffers() *Buffers
Package-Level Functions (only one)
NewBuffers is a required constructor to set up all the buffers/registers for the shell, because it contains maps that must be correctly initialized.
Package-Level Variables (total 7)
ErrCreate indicates that we failed to create the temp buffer file.
ErrNoTempDirectory indicates that Go's standard os.TempDir() did not return a directory.
ErrOpen indicates that we failed to open the buffer file.
ErrRead indicates that we failed to read the buffer file's content.
ErrRemove indicates that we failed to delete the buffer file.
ErrStart indicates that the command to start the editor failed.
ErrWrite indicates that we failed to write the buffer to the file.