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

Method MoveTextEnd

widget/text.go:661–667  ·  view source on GitHub ↗

MoveTextEnd moves the caret to the end of the text.

(selAct selectionAction)

Source from the content-addressed store, hash-verified

659
660// MoveTextEnd moves the caret to the end of the text.
661func (e *textView) MoveTextEnd(selAct selectionAction) {
662 caret := e.closestToRune(math.MaxInt)
663 e.caret.start = caret.runes
664 e.caret.xoff = fixed.I(e.params.MaxWidth) - caret.x
665 e.updateSelection(selAct)
666 e.clampCursorToGraphemes()
667}
668
669// MoveLineStart moves the caret to the start of the current line, ensuring that the resulting
670// cursor position is on a grapheme cluster boundary.

Callers 2

commandMethod · 0.80

Calls 3

closestToRuneMethod · 0.95
updateSelectionMethod · 0.95

Tested by 1