MCPcopy Create free account
hub / github.com/gioui/gio / SelectedText

Method SelectedText

widget/selectable.go:137–141  ·  view source on GitHub ↗

SelectedText returns the currently selected text (if any) from the editor.

()

Source from the content-addressed store, hash-verified

135
136// SelectedText returns the currently selected text (if any) from the editor.
137func (l *Selectable) SelectedText() string {
138 l.initialize()
139 l.scratch = l.text.SelectedText(l.scratch)
140 return string(l.scratch)
141}
142
143// ClearSelection clears the selection, by setting the selection end equal to
144// the selection start.

Callers 2

TestSelectableZeroValueFunction · 0.95
commandMethod · 0.45

Calls 1

initializeMethod · 0.95

Tested by 1

TestSelectableZeroValueFunction · 0.76