selectModeToggle toggles the SelectMode, updating selection with cursor movement
()
| 880 | |
| 881 | // selectModeToggle toggles the SelectMode, updating selection with cursor movement |
| 882 | func (tf *TextField) selectModeToggle() { |
| 883 | if tf.selectMode { |
| 884 | tf.selectMode = false |
| 885 | } else { |
| 886 | tf.selectMode = true |
| 887 | tf.selectInit = tf.cursorPos |
| 888 | tf.selectStart = tf.cursorPos |
| 889 | tf.selectEnd = tf.selectStart |
| 890 | } |
| 891 | } |
| 892 | |
| 893 | // shiftSelect sets the selection start if the shift key is down but wasn't previously. |
| 894 | // If the shift key has been released, the selection info is cleared. |
no outgoing calls
no test coverage detected