diff --git a/ansi/cursor.go b/ansi/cursor.go index 8a917b2d..6acae9e6 100644 --- a/ansi/cursor.go +++ b/ansi/cursor.go @@ -163,6 +163,10 @@ func SetCursorPosition(col, row int) string { return "\x1b[" + strconv.Itoa(row) + ";" + strconv.Itoa(col) + "H" } +// HomeCursorPosition is a sequence for moving the cursor to the upper left +// corner of the scrolling region. This is equivalent to `SetCursorPosition(1, 1)`. +const HomeCursorPosition = "\x1b[H" + // MoveCursor (CUP) returns a sequence for setting the cursor to the // given row and column. //