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

Method jumpToLine

texteditor/nav.go:725–729  ·  view source on GitHub ↗

jumpToLine jumps to given line number (minus 1)

(ln int)

Source from the content-addressed store, hash-verified

723
724// jumpToLine jumps to given line number (minus 1)
725func (ed *Editor) jumpToLine(ln int) {
726 ed.SetCursorShow(lexer.Pos{Ln: ln - 1})
727 ed.savePosHistory(ed.CursorPos)
728 ed.NeedsLayout()
729}
730
731// findNextLink finds next link after given position, returns false if no such links
732func (ed *Editor) findNextLink(pos lexer.Pos) (lexer.Pos, text.Region, bool) {

Callers 1

JumpToLinePromptMethod · 0.95

Calls 3

SetCursorShowMethod · 0.95
savePosHistoryMethod · 0.95
NeedsLayoutMethod · 0.95

Tested by

no test coverage detected