diff --git a/ansi/cursor.go b/ansi/cursor.go index f79e1e7e..8a917b2d 100644 --- a/ansi/cursor.go +++ b/ansi/cursor.go @@ -163,10 +163,28 @@ func SetCursorPosition(col, row int) string { return "\x1b[" + strconv.Itoa(row) + ";" + strconv.Itoa(col) + "H" } +// MoveCursor (CUP) returns a sequence for setting the cursor to the +// given row and column. +// +// CSI n ; m H +// +// See: https://vt100.net/docs/vt510-rm/CUP.html +// +// Deprecated: use SetCursorPosition instead. +func MoveCursor(col, row int) string { + return SetCursorPosition(col, row) +} + // CursorOrigin is a sequence for moving the cursor to the upper left corner of // the display. This is equivalent to `SetCursorPosition(1, 1)`. const CursorOrigin = "\x1b[1;1H" +// MoveCursorOrigin is a sequence for moving the cursor to the upper left +// corner of the display. This is equivalent to `SetCursorPosition(1, 1)`. +// +// Deprecated: use CursorOrigin instead. +const MoveCursorOrigin = CursorOrigin + // SaveCursorPosition (SCP or SCOSC) is a sequence for saving the cursor // position. //