Top moves the cursor to the top of the area. This is done by calculating how many lines were moved by Up and Down.
()
| 93 | // Top moves the cursor to the top of the area. |
| 94 | // This is done by calculating how many lines were moved by Up and Down. |
| 95 | func (area *Area) Top() { |
| 96 | if area.cursorPosY < area.height { |
| 97 | area.Up(area.height - area.cursorPosY) |
| 98 | area.cursorPosY = area.height |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | // StartOfLine moves the cursor to the start of the current line. |
| 103 | func (area *Area) StartOfLine() { |