Permalink
Browse files

remove html on erase

  • Loading branch information...
1 parent 4b4cba4 commit f3a13b4898f80930b9988426410d64a776fa1ac5 @substack committed Mar 27, 2013
Showing with 10 additions and 0 deletions.
  1. +4 −0 browser.js
  2. +6 −0 vendor/term.js
View
4 browser.js
@@ -17,6 +17,10 @@ module.exports = function (cols, rows, handler) {
var h = parseInt(s.height, 10);
var dy = Math.ceil(h / size.height) + 1;
term.cursorPos([ term.y + dy, 0 ]);
+
+ term.once('erase', function (w) {
+ if (w === 'all') target.removeChild(div);
+ });
});
var tr = through(function (buf) {
View
6 vendor/term.js
@@ -2470,6 +2470,12 @@ Terminal.prototype.eraseInDisplay = function(params) {
; // no saved lines
break;
}
+ this.emit('erase', {
+ 0: 'below',
+ 1: 'above',
+ 2: 'all',
+ 3: 'saved'
+ }[params]);
};
// CSI Ps K Erase in Line (EL).

0 comments on commit f3a13b4

Please sign in to comment.