« get me outta code hell

Actually clear status line properly - http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2017-10-30 21:17:09 -0300
committerFlorrie <towerofnix@gmail.com>2017-10-30 21:17:09 -0300
commitff2d6d8fcef09afb6320f39d71002dbe8beb79b2 (patch)
tree9a4d42a348990d9bd0e94c126950690a52daa576
parentff46c17bc25ca7b4345641c373ae9b6db91f4fff (diff)
Actually clear status line properly
-rw-r--r--src/loop-play.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/loop-play.js b/src/loop-play.js
index f9eaab0..09b3cad 100644
--- a/src/loop-play.js
+++ b/src/loop-play.js
@@ -365,9 +365,9 @@ 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'
+      // ESC[K - clears the line going from the cursor position onwards.
+      // This is here to avoid artefacts from a previously printed status line.
+      fullStatusLine += '\x1b[K'
 
       const track = this.currentTrack