Skip to content

Commit 9f5d8fc

Browse files
committed
Merge pull request #96 from myndzi/less-flicker
Don't clear whole line every time; instead, clear everything after end of line
2 parents ae2f52e + ca70aee commit 9f5d8fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/node-progress.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ ProgressBar.prototype.render = function (tokens) {
152152
if (this.tokens) for (var key in this.tokens) str = str.replace(':' + key, this.tokens[key]);
153153

154154
if (this.lastDraw !== str) {
155-
this.stream.clearLine();
156155
this.stream.cursorTo(0);
157156
this.stream.write(str);
157+
this.stream.clearLine(1);
158158
this.lastDraw = str;
159159
}
160160
};

0 commit comments

Comments
 (0)