use setImmediate everywhere.
This commit is contained in:
parent
a9153aeef5
commit
1795cd93d6
|
@ -17,6 +17,8 @@ var Tput = require('./tput')
|
|||
, colors = require('./colors')
|
||||
, slice = Array.prototype.slice;
|
||||
|
||||
var nextTick = global.setImmediate || process.nextTick.bind(process);
|
||||
|
||||
/**
|
||||
* Program
|
||||
*/
|
||||
|
@ -1283,7 +1285,7 @@ Program.prototype._buffer = function(text) {
|
|||
|
||||
this._buf = text;
|
||||
|
||||
process.nextTick(this._flush);
|
||||
nextTick(this._flush);
|
||||
};
|
||||
|
||||
Program.prototype.flush = function(text) {
|
||||
|
|
|
@ -6496,7 +6496,7 @@ function Terminal(options) {
|
|||
});
|
||||
|
||||
this.on('resize', function() {
|
||||
setImmediate(function() {
|
||||
nextTick(function() {
|
||||
self.term.resize(self.width - self.iwidth, self.height - self.iheight);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue