MCPcopy Create free account
hub / github.com/gioui/gio / MoveTextStart

Method MoveTextStart

widget/text.go:651–658  ·  view source on GitHub ↗

MoveTextStart moves the caret to the start of the text.

(selAct selectionAction)

Source from the content-addressed store, hash-verified

649
650// MoveTextStart moves the caret to the start of the text.
651func (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.
661func (e *textView) MoveTextEnd(selAct selectionAction) {

Callers 2

commandMethod · 0.80

Calls 3

closestToRuneMethod · 0.95
updateSelectionMethod · 0.95

Tested by 1