@@ -42,83 +42,83 @@ var (
4242 Report ANSI = newAnsi (esc + "6n" )
4343)
4444
45- // Up moves up the cursor.
45+ // Up moves the cursor up by n positions (CUU) .
4646func Up (n uint ) ANSI {
4747 if n == 0 {
4848 return empty
4949 }
5050 return newAnsi (fmt .Sprintf (esc + "%dA" , n ))
5151}
5252
53- // Down moves down the cursor.
53+ // Down moves the cursor down by n positions (CUD) .
5454func Down (n uint ) ANSI {
5555 if n == 0 {
5656 return empty
5757 }
5858 return newAnsi (fmt .Sprintf (esc + "%dB" , n ))
5959}
6060
61- // Right moves right the cursor.
61+ // Right moves the cursor right by n positions (CUF) .
6262func Right (n uint ) ANSI {
6363 if n == 0 {
6464 return empty
6565 }
6666 return newAnsi (fmt .Sprintf (esc + "%dC" , n ))
6767}
6868
69- // Left moves left the cursor.
69+ // Left moves the cursor left by n positions (CUB) .
7070func Left (n uint ) ANSI {
7171 if n == 0 {
7272 return empty
7373 }
7474 return newAnsi (fmt .Sprintf (esc + "%dD" , n ))
7575}
7676
77- // NextLine moves down the cursor to head of a line.
77+ // NextLine moves the cursor down n lines and to the beginning of the line (CNL) .
7878func NextLine (n uint ) ANSI {
7979 if n == 0 {
8080 return empty
8181 }
8282 return newAnsi (fmt .Sprintf (esc + "%dE" , n ))
8383}
8484
85- // PreviousLine moves up the cursor to head of a line.
85+ // PreviousLine moves the cursor up n lines and to the beginning of the line (CPL) .
8686func PreviousLine (n uint ) ANSI {
8787 if n == 0 {
8888 return empty
8989 }
9090 return newAnsi (fmt .Sprintf (esc + "%dF" , n ))
9191}
9292
93- // Column set the cursor position to a given column.
93+ // Column sets the cursor position to a given column (CHA) .
9494func Column (col uint ) ANSI {
9595 return newAnsi (fmt .Sprintf (esc + "%dG" , col ))
9696}
9797
98- // Position set the cursor position to a given absolute position.
98+ // Position sets the cursor position to a given absolute position (CUP) .
9999func Position (row , col uint ) ANSI {
100100 return newAnsi (fmt .Sprintf (esc + "%d;%dH" , row , col ))
101101}
102102
103- // EraseDisplay erases display by given EraseMode.
103+ // EraseDisplay erases the display using the given EraseMode (ED) .
104104func EraseDisplay (m EraseMode ) ANSI {
105105 return newAnsi (fmt .Sprintf (esc + "%dJ" , m ))
106106}
107107
108- // EraseLine erases lines by given EraseMode.
108+ // EraseLine erases the line using the given EraseMode (EL) .
109109func EraseLine (m EraseMode ) ANSI {
110110 return newAnsi (fmt .Sprintf (esc + "%dK" , m ))
111111}
112112
113- // ScrollUp scrolls up the page .
113+ // ScrollUp scrolls the display up by n lines (SU) .
114114func ScrollUp (n int ) ANSI {
115115 if n == 0 {
116116 return empty
117117 }
118118 return newAnsi (fmt .Sprintf (esc + "%dS" , n ))
119119}
120120
121- // ScrollDown scrolls down the page .
121+ // ScrollDown scrolls the display down by n lines (SD) .
122122func ScrollDown (n int ) ANSI {
123123 if n == 0 {
124124 return empty
0 commit comments