selection returns the currently selected text
()
| 872 | |
| 873 | // selection returns the currently selected text |
| 874 | func (tf *TextField) selection() string { |
| 875 | if tf.hasSelection() { |
| 876 | return string(tf.editText[tf.selectStart:tf.selectEnd]) |
| 877 | } |
| 878 | return "" |
| 879 | } |
| 880 | |
| 881 | // selectModeToggle toggles the SelectMode, updating selection with cursor movement |
| 882 | func (tf *TextField) selectModeToggle() { |
no test coverage detected