Documentation
¶
Overview ¶
Package lineedit is the one-line text editor behind every text field of the UI. It depends on nothing in package ui, so components in their own packages can edit the shared line.
Index ¶
- func Typed(k tea.KeyPressMsg) string
- type Line
- func (l *Line) CanPoint() bool
- func (l *Line) Clear()
- func (l *Line) Head() string
- func (l *Line) Insert(text string)
- func (l *Line) IsFormula() bool
- func (l *Line) Key(k tea.KeyPressMsg)
- func (l *Line) Set(text string)
- func (l *Line) SetCaret(x int)
- func (l *Line) Tail() string
- func (l *Line) Text() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Typed ¶
func Typed(k tea.KeyPressMsg) string
Typed returns the printable text of a key press, if any.
Types ¶
type Line ¶
Line is the one-line text editor behind every text field: the entry typed into a cell (ENTER, EDIT), prompts on the context line, and the search fields of the find bar and the pickers. Only one of them is edited at a time, so they share it; a component with several fields keeps the others' text itself and loads a field here to edit it.
func (*Line) CanPoint ¶
CanPoint reports whether the text before the caret ends where a cell reference may follow.
func (*Line) Insert ¶
Insert types text at the caret. Line breaks and tabs become spaces, and other control characters are dropped.