TextStateOf#
func TextStateOf(editor *text.Editor) TextStateTextStateOf snapshots editor into the state native text services mirror.
type TextState struct {
// SelectionReversed preserves the moving end of a backwards selection.
SelectionReversed bool
Value string
Selection TextRange
Composition TextRange
Composing bool
// Redraw asks for a frame after the event although the editor looks the same,
// because the application changed something else in response. A terminal
// uses it when typed text appears ahead of the server's echo; ordinary
// terminal input leaves it false and costs no frame.
Redraw bool
}TextState is the complete application-owned native editor state.
TextStateOf#func TextStateOf(editor *text.Editor) TextStateTextStateOf snapshots editor into the state native text services mirror.