Documentation
¶
Overview ¶
Package commitmsg prompts for the commit message of one split tag during a multi-split. The parent model owns the prompt, routes keys to it while it is visible, and reads the finished message back out when the user confirms.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the commit message prompt. Keystrokes reach it through the parent model, which must copy it back into its own state because every mutator takes a pointer receiver.
func (*Model) AppendChar ¶
AppendChar adds one character to the end of the message with no length limit.
func (*Model) Backspace ¶
func (m *Model) Backspace()
Backspace drops the final byte of the message, so a multi-byte rune is removed one byte at a time. An empty message is left alone.
func (Model) GetMessage ¶
GetMessage returns the text typed so far, empty when the user has entered nothing.
func (*Model) Hide ¶
func (m *Model) Hide()
Hide takes the prompt off screen and keeps the typed message, which stays readable through GetMessage until the next SetTag.
func (*Model) IsVisible ¶
IsVisible reports whether keys belong to the prompt rather than the main view.
func (*Model) SetTag ¶
SetTag points the prompt at a split tag and clears any message typed for the previous one.