package
Version:
v0.8.0
Opens a new window with list of versions in this module.
Published: Mar 26, 2026
License: BSD-2-Clause, MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Mode represents the current vi-style input state.
const (
ModeInsert Mode = iota
ModeNormal
)
type Model struct {
Prompt string
}
Model is the state container for the vi-style input component.
New returns a Model initialized for insert mode.
Blur marks the model as inactive.
Focus marks the model as active and returns a no-op command.
Mode returns the current editing mode.
SetValue replaces the current buffer contents.
Update applies a key event to the model.
Value returns the current buffer contents.
View renders the prompt, value and cursor.
WantsExit reports whether normal mode requested that editing end.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.