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

Method scrollCursorToTop

texteditor/nav.go:886–889  ·  view source on GitHub ↗

scrollCursorToTop tells any parent scroll layout to scroll to get cursor at top of view to extent possible -- returns true if scrolled.

()

Source from the content-addressed store, hash-verified

884// scrollCursorToTop tells any parent scroll layout to scroll to get cursor
885// at top of view to extent possible -- returns true if scrolled.
886func (ed *Editor) scrollCursorToTop() bool {
887 curBBox := ed.cursorBBox(ed.CursorPos)
888 return ed.scrollToTop(curBBox.Min.Y)
889}
890
891// scrollToBottom tells any parent scroll layout to scroll to get given
892// vertical coordinate at bottom of view to extent possible -- returns true if

Callers 3

cursorPageDownMethod · 0.95
cursorRecenterMethod · 0.95
CursorStartDocMethod · 0.95

Calls 2

cursorBBoxMethod · 0.95
scrollToTopMethod · 0.95

Tested by

no test coverage detected