text: // Generated by CoffeeScript 2.0.0-beta8
  void function () {
    var clearFrom, Parser;
    Parser = require('../vendor/ansi_parse');
    clearFrom = function (history, position) {
      var lastLine, lines;
      lines = history.split('\n');
      lastLine = lines.pop();
      lastLine = lastLine.substr(0, position);
      lines.push(lastLine);
      return lines.join('\n');
    };
    module.exports = {
      parse: function (history, data) {
        var parser;
        parser = new Parser;
        parser.on('command', function (character, params, intermediate) {
          var param1;
          param1 = params[0];
          switch (character) {
          case 'H':
            return history = '';
          case 'J':
            return history = clearFrom(history, param1);
          }
        });
        parser.on('data', function (newData) {
          return history += newData;
        });
        parser.parse(data);
        return history;
      }
    };
  }.call(this);
  