From 022a1d5b0987acf318ad0affb44f9940b3ca94d1 Mon Sep 17 00:00:00 2001 From: Maxim Khokhryakov Date: Sat, 2 Sep 2023 18:48:37 +0500 Subject: [PATCH] Fix MultiBar.remove behavior --- lib/multi-bar.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/multi-bar.js b/lib/multi-bar.js index d40ccfc..99d2e8e 100644 --- a/lib/multi-bar.js +++ b/lib/multi-bar.js @@ -114,7 +114,7 @@ module.exports = class MultiBar extends _EventEmitter{ this.bars.splice(index, 1); // force update - this.update(); + this.update(true); // clear bottom this.terminal.newline(); @@ -124,7 +124,7 @@ module.exports = class MultiBar extends _EventEmitter{ } // internal update routine - update(){ + update(forceRendering=false){ // stop timer if (this.timer){ clearTimeout(this.timer); @@ -158,7 +158,7 @@ module.exports = class MultiBar extends _EventEmitter{ } // render - this.bars[i].render(); + this.bars[i].render(forceRendering); } // trigger event