Codebase list golang-github-vbauerster-mpb / 8c08cda
simplify a bit Vladimir Bauer 9 years ago
1 changed file(s) with 0 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
5252 func (w *Writer) clearLines() {
5353 f, ok := w.out.(FdWriter)
5454 if ok && !isatty.IsTerminal(f.Fd()) {
55 ok = false
56 }
57 if !ok {
5855 for i := 0; i < w.lineCount; i++ {
5956 fmt.Fprintf(w.out, "%c[%dA", ESC, 0) // move the cursor up
6057 fmt.Fprintf(w.out, "%c[2K\r", ESC) // clear the line