Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix bug with line clearing

Whenever a control sequence is reached, a new result is created.
However, for line clearing, we don't necessarily want this, so let's
undo it.
  • Loading branch information...
commit 5707b442d9f9cba55b9019e512ab34241a36bf7c 1 parent 4633903
@henrikhodne authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/ansiparse.js
View
6 lib/ansiparse.js
@@ -143,6 +143,12 @@ ansiparse = function (str) {
//
// `K` finished line clearing
//
+
+ // Undo emitting the last text
+ state = result.pop();
+ matchingText = state.text;
+ delete state.text;
+
if (matchingData == '1') {
while ((result.length > 0 || matchingText.length > 0) && lastChar() != '\n') eraseChar();
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.