SelectedText returns the currently selected text (if any) from the editor.
()
| 135 | |
| 136 | // SelectedText returns the currently selected text (if any) from the editor. |
| 137 | func (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. |