cursorDelete deletes character(s) immediately after the cursor
(steps int)
| 596 | |
| 597 | // cursorDelete deletes character(s) immediately after the cursor |
| 598 | func (ed *Editor) cursorDelete(steps int) { |
| 599 | ed.validateCursor() |
| 600 | if ed.HasSelection() { |
| 601 | ed.deleteSelection() |
| 602 | return |
| 603 | } |
| 604 | // note: no update b/c signal from buf will drive update |
| 605 | org := ed.CursorPos |
| 606 | ed.cursorForward(steps) |
| 607 | ed.Buffer.DeleteText(org, ed.CursorPos, EditSignal) |
| 608 | ed.SetCursorShow(org) |
| 609 | ed.NeedsRender() |
| 610 | } |
| 611 | |
| 612 | // cursorBackspaceWord deletes words(s) immediately before cursor |
| 613 | func (ed *Editor) cursorBackspaceWord(steps int) { |
no test coverage detected