类型 TextState

API 文档由 Go 源码生成,内容为英文。

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) TextState

TextStateOf snapshots editor into the state native text services mirror.