cursorEndDoc moves the cursor to the end of the text, updating selection if select mode is active
()
| 560 | // cursorEndDoc moves the cursor to the end of the text, updating selection if |
| 561 | // select mode is active |
| 562 | func (ed *Editor) cursorEndDoc() { |
| 563 | ed.validateCursor() |
| 564 | org := ed.CursorPos |
| 565 | ed.CursorPos.Ln = max(ed.NumLines-1, 0) |
| 566 | ed.CursorPos.Ch = ed.Buffer.LineLen(ed.CursorPos.Ln) |
| 567 | ed.cursorColumn = ed.CursorPos.Ch |
| 568 | ed.setCursor(ed.CursorPos) |
| 569 | ed.scrollCursorToBottom() |
| 570 | ed.renderCursor(true) |
| 571 | ed.cursorSelect(org) |
| 572 | ed.NeedsRender() |
| 573 | } |
| 574 | |
| 575 | // todo: ctrl+backspace = delete word |
| 576 | // shift+arrow = select |
no test coverage detected