CursorToViewCenter moves the cursor to the center of the view
()
| 187 | |
| 188 | // CursorToViewCenter moves the cursor to the center of the view |
| 189 | func (h *BufPane) CursorToViewCenter() bool { |
| 190 | v := h.GetView() |
| 191 | h.Buf.ClearCursors() |
| 192 | h.Cursor.GotoLoc(h.LocFromVLoc(display.VLoc{ |
| 193 | SLoc: h.Scroll(v.StartLine, h.BufView().Height/2), |
| 194 | VisualX: 0, |
| 195 | })) |
| 196 | return true |
| 197 | } |
| 198 | |
| 199 | // CursorToViewBottom moves the cursor to the bottom of the view, |
| 200 | // offset by scrollmargin unless at the beginning or end of the file |
nothing calls this directly
no test coverage detected