Skip to content
Myr

More accurate names for prev/next line movement functions

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christian Rocha · committed by Christian Rocha · parent 0c8e2ea · Browse files · 1 file+7 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−5 removed

  • other:+7 added−5 removed

1 file+7 added−5 removed

modified:tea.go+7 added-5 removed
167 unmodified lines
168func showCursor() {169 fmt.Printf(esc + "?25h")170}171172// Move the cursor up a given number of lines173func cursorDown(n int) {172// Move the cursor down a given number of lines and place it at the beginning173// of the line174func cursorNextLine(n int) {175 fmt.Printf(esc+"%dE", n)176}177177// Move the cursor up a given number of lines178func cursorUp(n int) {178// Move the cursor up a given number of lines and place it at the beginning of179// the line180func cursorPrevLine(n int) {181 fmt.Printf(esc+"%dF", n)182}183184// Clear the current line
4 unmodified lines
189// Clear a given number of lines190func clearLines(n int) {191 for i := 0; i < n; i++ {192 clearLine()191 cursorUp(1)193 cursorPrevLine(1)194 }195}196197// ClearScreen clears the visible portion of the terminal
3 unmodified lines