cursorDeleteWord deletes word(s) immediately after the cursor
(steps int)
| 628 | |
| 629 | // cursorDeleteWord deletes word(s) immediately after the cursor |
| 630 | func (ed *Editor) cursorDeleteWord(steps int) { |
| 631 | ed.validateCursor() |
| 632 | if ed.HasSelection() { |
| 633 | ed.deleteSelection() |
| 634 | return |
| 635 | } |
| 636 | // note: no update b/c signal from buf will drive update |
| 637 | org := ed.CursorPos |
| 638 | ed.cursorForwardWord(steps) |
| 639 | ed.Buffer.DeleteText(org, ed.CursorPos, EditSignal) |
| 640 | ed.SetCursorShow(org) |
| 641 | ed.NeedsRender() |
| 642 | } |
| 643 | |
| 644 | // cursorKill deletes text from cursor to end of text |
| 645 | func (ed *Editor) cursorKill() { |
no test coverage detected