clear screen on windows during Screen.enter.
This commit is contained in:
parent
a42631cbc7
commit
582831e5bc
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue