clear screen on windows during Screen.enter.

This commit is contained in:
Christopher Jeffrey 2015-04-27 01:23:30 -07:00
parent a42631cbc7
commit 582831e5bc
1 changed files with 9 additions and 1 deletions

View File

@ -12,7 +12,8 @@ var EventEmitter = require('./events').EventEmitter
, assert = require('assert')
, path = require('path')
, util = require('util')
, fs = require('fs');
, fs = require('fs')
, cp = require('child_process');
var colors = require('./colors')
, program = require('./program')
@ -448,6 +449,13 @@ Screen.prototype.enter = function() {
this.cursorColor(this.cursor.color);
}
}
if (process.platform === 'win32') {
try {
cp.execSync('cls', { stdio: 'ignore', timeout: 1000 });
} catch (e) {
;
}
}
this.program.alternateBuffer();
this.program.put.keypad_xmit();
this.program.csr(0, this.height - 1);