scrollCursorToVerticalCenter tells any parent scroll layout to scroll to get cursor at vert center of view to extent possible -- returns true if scrolled.
()
| 915 | // cursor at vert center of view to extent possible -- returns true if |
| 916 | // scrolled. |
| 917 | func (ed *Editor) scrollCursorToVerticalCenter() bool { |
| 918 | curBBox := ed.cursorBBox(ed.CursorPos) |
| 919 | mid := (curBBox.Min.Y + curBBox.Max.Y) / 2 |
| 920 | return ed.scrollToVerticalCenter(mid) |
| 921 | } |
| 922 | |
| 923 | func (ed *Editor) scrollCursorToTarget() { |
| 924 | // fmt.Println(ed, "to target:", ed.CursorTarg) |
no test coverage detected