Center centers the view on the cursor
()
| 161 | |
| 162 | // Center centers the view on the cursor |
| 163 | func (h *BufPane) Center() bool { |
| 164 | v := h.GetView() |
| 165 | v.StartLine = h.Scroll(h.SLocFromLoc(h.Cursor.Loc), -h.BufView().Height/2) |
| 166 | h.SetView(v) |
| 167 | h.ScrollAdjust() |
| 168 | return true |
| 169 | } |
| 170 | |
| 171 | // CursorToViewTop moves the cursor to the top of the view, |
| 172 | // offset by scrollmargin unless at the beginning or end of the file |
nothing calls this directly
no test coverage detected