diff options
author | Florrie <towerofnix@gmail.com> | 2017-10-30 16:28:30 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2017-10-30 16:28:30 -0300 |
commit | d2460716084e918cad41964683420ca5c07d85ae (patch) | |
tree | 961a579bcabdd0b031aec46c9fa87477ad71fcb6 /src | |
parent | 5ccf456d9ba332d587c97e8724a5b767e96a5802 (diff) |
Clear old status line when printing a new one
Diffstat (limited to 'src')
-rw-r--r-- | src/loop-play.js | 4 |
1 files changed, 4 insertions, 0 deletions
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) { |