MCPcopy Create free account
hub / github.com/cogentcore/core / CursorStartDoc

Method CursorStartDoc

texteditor/nav.go:516–527  ·  view source on GitHub ↗

CursorStartDoc moves the cursor to the start of the text, updating selection if select mode is active

()

Source from the content-addressed store, hash-verified

514// CursorStartDoc moves the cursor to the start of the text, updating selection
515// if select mode is active
516func (ed *Editor) CursorStartDoc() {
517 ed.validateCursor()
518 org := ed.CursorPos
519 ed.CursorPos.Ln = 0
520 ed.CursorPos.Ch = 0
521 ed.cursorColumn = ed.CursorPos.Ch
522 ed.setCursor(ed.CursorPos)
523 ed.scrollCursorToTop()
524 ed.renderCursor(true)
525 ed.cursorSelect(org)
526 ed.NeedsRender()
527}
528
529// cursorEndLine moves the cursor to the end of the text
530func (ed *Editor) cursorEndLine() {

Callers 1

keyInputMethod · 0.95

Calls 6

validateCursorMethod · 0.95
setCursorMethod · 0.95
scrollCursorToTopMethod · 0.95
renderCursorMethod · 0.95
cursorSelectMethod · 0.95
NeedsRenderMethod · 0.80

Tested by

no test coverage detected