cursorBackspaceWord deletes words(s) immediately before cursor
(steps int)
| 824 | |
| 825 | // cursorBackspaceWord deletes words(s) immediately before cursor |
| 826 | func (tf *TextField) cursorBackspaceWord(steps int) { |
| 827 | if tf.hasSelection() { |
| 828 | tf.deleteSelection() |
| 829 | return |
| 830 | } |
| 831 | org := tf.cursorPos |
| 832 | tf.cursorBackwardWord(steps) |
| 833 | tf.edited = true |
| 834 | tf.editText = append(tf.editText[:tf.cursorPos], tf.editText[org:]...) |
| 835 | tf.NeedsRender() |
| 836 | } |
| 837 | |
| 838 | // cursorDeleteWord deletes word(s) immediately after the cursor |
| 839 | func (tf *TextField) cursorDeleteWord(steps int) { |
no test coverage detected