Codebase list golang-github-vbauerster-mpb / 1fddcd9
Fix update for urxvt Move the cursor one line up instead of zero lines. This fixes the bar updates with urxvt, which does nothing otherwise. Also verified to work on terminals based on libvte. Alexander Neumann 9 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
2020
2121 func (w *Writer) clearLines() {
2222 for i := 0; i < w.lineCount; i++ {
23 fmt.Fprintf(w.out, "%c[%dA", ESC, 0) // move the cursor up
23 fmt.Fprintf(w.out, "%c[%dA", ESC, 1) // move the cursor up
2424 fmt.Fprintf(w.out, "%c[2K\r", ESC) // clear the line
2525 }
2626 }