cursorDeleteWord deletes word(s) immediately after the cursor
(steps int)
| 837 | |
| 838 | // cursorDeleteWord deletes word(s) immediately after the cursor |
| 839 | func (tf *TextField) cursorDeleteWord(steps int) { |
| 840 | if tf.hasSelection() { |
| 841 | tf.deleteSelection() |
| 842 | return |
| 843 | } |
| 844 | // note: no update b/c signal from buf will drive update |
| 845 | org := tf.cursorPos |
| 846 | tf.cursorForwardWord(steps) |
| 847 | tf.edited = true |
| 848 | tf.editText = append(tf.editText[:tf.cursorPos], tf.editText[org:]...) |
| 849 | tf.NeedsRender() |
| 850 | } |
| 851 | |
| 852 | // cursorKill deletes text from cursor to end of text |
| 853 | func (tf *TextField) cursorKill() { |
no test coverage detected