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

Commit

Permalink
Fix PreviousLine and NextLine on linux (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
System-Glitch committed Dec 11, 2020
1 parent 90b418e commit f45c05b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions terminal/cursor.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ func (c *Cursor) Back(n int) {

// NextLine moves cursor to beginning of the line n lines down.
func (c *Cursor) NextLine(n int) {
fmt.Fprintf(c.Out, "\x1b[%dE", n)
c.Down(1)
}

// PreviousLine moves cursor to beginning of the line n lines up.
func (c *Cursor) PreviousLine(n int) {
fmt.Fprintf(c.Out, "\x1b[%dF", n)
c.Up(1)
}

// HorizontalAbsolute moves cursor horizontally to x.
Expand Down

0 comments on commit f45c05b

Please sign in to comment.