From d2460716084e918cad41964683420ca5c07d85ae Mon Sep 17 00:00:00 2001 From: Florrie Date: Mon, 30 Oct 2017 16:28:30 -0300 Subject: Clear old status line when printing a new one --- src/loop-play.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/loop-play.js b/src/loop-play.js index 01e1574..dbc0ba8 100644 --- a/src/loop-play.js +++ b/src/loop-play.js @@ -363,6 +363,10 @@ class PlayController extends EventEmitter { this.player.on('printStatusLine', playerString => { let fullStatusLine = '' + // 1K - clears the screen from the start of the cursor onwards. This is + // here to avoid artefacts from a previously printed status line. + fullStatusLine += '\x1b[1K' + const track = this.currentTrack if (track) { -- cgit 1.3.0-6-gf8a5