Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Fixes #334: Make sure the cursor goes back to the begining of the lin… #335

Merged
merged 1 commit into from Apr 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions terminal/cursor.go
Expand Up @@ -43,11 +43,13 @@ func (c *Cursor) Back(n int) {
// NextLine moves cursor to beginning of the line n lines down.
func (c *Cursor) NextLine(n int) {
c.Down(1)
c.HorizontalAbsolute(0)
}

// PreviousLine moves cursor to beginning of the line n lines up.
func (c *Cursor) PreviousLine(n int) {
c.Up(1)
c.HorizontalAbsolute(0)
}

// HorizontalAbsolute moves cursor horizontally to x.
Expand Down