diff --git a/public/javascripts/ansi-interpreter.js b/public/javascripts/ansi-interpreter.js index 255ea10..20a3dc5 100644 --- a/public/javascripts/ansi-interpreter.js +++ b/public/javascripts/ansi-interpreter.js @@ -163,23 +163,13 @@ SP.AnsiInterpreter.prototype = { } if (handler) { - handler.call(this, data, match); data = data.slice(match[0].length) - } else { - - var s = data.slice(0, 10); - var hex = ''; - for (i=0; i 0) + console.log('rest: ' + rest); + + this.currentData = rest + this.data.slice(this.dataIndex, this.dataIndex + n); this.dataIndex += n; this.frame += 1; + + if (rest.length > 20) { + var s = rest.slice(0, 10); + var hex = ''; + for (i=0; i