« get me outta code hell

http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
path: root/src/loop-play.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/loop-play.js')
-rw-r--r--src/loop-play.js4
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) {