Move moves the cursor relative by x and y.
(x, y int)
| 130 | |
| 131 | // Move moves the cursor relative by x and y. |
| 132 | func (area *Area) Move(x, y int) { |
| 133 | if x > 0 { |
| 134 | area.cursor.Right(x) |
| 135 | } else if x < 0 { |
| 136 | area.cursor.Left(-x) |
| 137 | } |
| 138 | |
| 139 | if y > 0 { |
| 140 | area.Up(y) |
| 141 | } else if y < 0 { |
| 142 | area.Down(-y) |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | // ClearLinesUp clears n lines upwards from the current position and moves the cursor. |
| 147 | func (area *Area) ClearLinesUp(n int) { |