Permalink
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...
1 parent 4633903 commit 5707b442d9f9cba55b9019e512ab34241a36bf7c @henrikhodne committed Dec 6, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/ansiparse.js
View
@@ -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 {

0 comments on commit 5707b44

Please sign in to comment.