MoveTextStart moves the caret to the start of the text.
(selAct selectionAction)
| 649 | |
| 650 | // MoveTextStart moves the caret to the start of the text. |
| 651 | func (e *textView) MoveTextStart(selAct selectionAction) { |
| 652 | caret := e.closestToRune(e.caret.end) |
| 653 | e.caret.start = 0 |
| 654 | e.caret.end = caret.runes |
| 655 | e.caret.xoff = -caret.x |
| 656 | e.updateSelection(selAct) |
| 657 | e.clampCursorToGraphemes() |
| 658 | } |
| 659 | |
| 660 | // MoveTextEnd moves the caret to the end of the text. |
| 661 | func (e *textView) MoveTextEnd(selAct selectionAction) { |